Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fixed email validation

Cette révision appartient à :
akuma06 2017-05-07 20:10:23 +02:00
Parent 646606c7a8
révision 07f15034be

Voir le fichier

@ -13,12 +13,10 @@ func EmailValidation(email string, err map[string][]string) (bool, map[string][]
exp, errorRegex := regexp.Compile(EMAIL_REGEX)
if regexpCompiled := log.CheckError(errorRegex); regexpCompiled {
if exp.MatchString(email) {
err["email"] = append(err["email"], "Email Address is not valid")
return true, err
}
} else {
return false, err
}
}
err["email"] = append(err["email"], "Email Address is not valid")
return false, err
}
func ValidateUsername(username string, err map[string][]string) (bool, map[string][]string) {