From d86e5e1c82453f62984092cf8277900659f6e4f4 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 10 Jan 2013 00:57:49 +0200 Subject: [PATCH] added dash as a valid character --- func/main.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func/main.sh b/func/main.sh index 697ef4ff..a3ba87f3 100644 --- a/func/main.sh +++ b/func/main.sh @@ -556,7 +556,7 @@ validate_format_email() { # Username validate_format_username() { - if ! [[ "$1" =~ ^[a-zA-Z0-9]+([\.|_][a-zA-Z0-9]+)?$ ]]; then + if ! [[ "$1" =~ ^[a-zA-Z0-9]+([\.|_|-][a-zA-Z0-9]+)?$ ]]; then echo "Error: $2 $1 is not valid" log_event "$E_INVALID" "$EVENT" exit $E_INVALID