mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-08 06:04:20 +08:00
fix user email validation
This commit is contained in:
parent
2f0d289813
commit
3dedb20f94
1 changed files with 1 additions and 1 deletions
|
@ -55,6 +55,6 @@ func GetClient() (e EmailSender) {
|
|||
}
|
||||
|
||||
func IsValid(email string) bool {
|
||||
emailRegex := regexp.MustCompile(`^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,4}$`)
|
||||
emailRegex := regexp.MustCompile(`^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,}$`)
|
||||
return emailRegex.MatchString(email)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue