Skip to content

Commit 53a4216

Browse files
Rubenjaapmarcus
authored andcommitted
Created a function that checks for usernames starting with a alfabetic character.
1 parent 527f2bd commit 53a4216

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

func/main.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,9 @@ is_user_format_valid() {
725725
if [ "$1" != "${1//[^[:ascii:]]/}" ]; then
726726
check_result "$E_INVALID" "invalid $2 format :: $1"
727727
fi
728+
if ! [[ "$1" =~ ^[a-zA-Z]+ ]]; then
729+
check_result "$E_INVALID" "invalid $2 format :: $1"
730+
fi
728731
}
729732

730733
# Domain format validator

0 commit comments

Comments
 (0)