Update regex pattern

This commit is contained in:
Whispering Wind
2024-07-29 22:49:29 +03:30
committed by GitHub
parent 01338a6290
commit fe8ae2a30d

View File

@ -37,8 +37,8 @@ add_user() {
fi fi
# Validate the username # Validate the username
if ! [[ "$username" =~ ^[a-z0-9]+$ ]]; then if ! [[ "$username" =~ ^[a-zA-Z0-9]+$ ]]; then
echo -e "${red}Error:${NC} Username can only contain lowercase letters and numbers." echo -e "${red}Error:${NC} Username can only contain letters and numbers."
exit 1 exit 1
fi fi