We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11a2735 commit d4b5bddCopy full SHA for d4b5bdd
func/main.sh
@@ -616,10 +616,17 @@ validate_format_name_s() {
616
617
# Username
618
validate_format_username() {
619
- if ! [[ "$1" =~ ^[a-zA-Z0-9][-|\.|_|a-zA-Z0-9]{0,28}[a-zA-Z0-9]$ ]]; then
620
- echo "Error: $2 $1 is not valid"
621
- log_event "$E_INVALID" "$EVENT"
622
- exit $E_INVALID
+ if [ "${#1}" -eq 1 ]; then
+ if ! [[ "$1" =~ [a-z] ]]; then
+ echo "Error: $2 $1 is not valid"
+ exit 1
623
+ fi
624
+ else
625
+ if ! [[ "$1" =~ ^[a-zA-Z0-9][-|\.|_|a-zA-Z0-9]{0,28}[a-zA-Z0-9]$ ]]
626
+ then
627
628
629
630
fi
631
}
632
0 commit comments