-6
appview/email/email.go
-6
appview/email/email.go
···
61
61
62
62
return true
63
63
}
64
-
65
-
func IsValidEmailSimple(email string) bool {
66
-
pattern := `^[a-zA-Z0-9.!#$%&'*+/=?^_\x60{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$`
67
-
regex := regexp.MustCompile(pattern)
68
-
return regex.MatchString(email) && len(email) <= 254 && len(email) >= 3
69
-
}