From 1aa19c01a039503bbc4e242b1abec143fe6292a0 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 15 Nov 2012 13:50:31 +0200 Subject: [PATCH] new pregmatch for user function --- func/main.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/func/main.sh b/func/main.sh index f9d1a3299..da4042d2a 100755 --- a/func/main.sh +++ b/func/main.sh @@ -556,7 +556,8 @@ validate_format_email() { # Username validate_format_username() { - if ! [[ "$1" =~ ^[0-z]+(\.[0-z]+)?$ ]] || [[ "${#1}" -gt 28 ]]; then + if ! [[ "$1" =~ ^[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)?$ ]] || [[ "${#1}" -gt 28 ]] + then echo "Error: $2 $1 is not valid" log_event "$E_INVALID" "$EVENT" exit $E_INVALID