We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55b905f commit a8a86acCopy full SHA for a8a86ac
func/main.sh
@@ -556,12 +556,7 @@ validate_format_email() {
556
557
# Username
558
validate_format_username() {
559
- if ! [[ "$1" =~ ^[[:alnum:]]+([\.|_|-][[:alnum:]]+)?$ ]]; then
560
- echo "Error: $2 $1 is not valid"
561
- log_event "$E_INVALID" "$EVENT"
562
- exit $E_INVALID
563
- fi
564
- if [[ "${#1}" -gt 28 ]]; then
+ if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then
565
echo "Error: $2 $1 is not valid"
566
log_event "$E_INVALID" "$EVENT"
567
exit $E_INVALID
0 commit comments