Skip to content

Commit 1aa19c0

Browse files
committed
new pregmatch for user function
1 parent 2d7b0ad commit 1aa19c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

func/main.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ validate_format_email() {
556556

557557
# Username
558558
validate_format_username() {
559-
if ! [[ "$1" =~ ^[0-z]+(\.[0-z]+)?$ ]] || [[ "${#1}" -gt 28 ]]; then
559+
if ! [[ "$1" =~ ^[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)?$ ]] || [[ "${#1}" -gt 28 ]]
560+
then
560561
echo "Error: $2 $1 is not valid"
561562
log_event "$E_INVALID" "$EVENT"
562563
exit $E_INVALID

0 commit comments

Comments
 (0)