Explorar o código

added dash as a valid character

Serghey Rodin %!s(int64=13) %!d(string=hai) anos
pai
achega
d86e5e1c82
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      func/main.sh

+ 1 - 1
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