10 lines
190 B
Go
10 lines
190 B
Go
package utils
|
|
|
|
import "regexp"
|
|
|
|
func IsEmailValid(email string) bool {
|
|
regex := `^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,}$`
|
|
re := regexp.MustCompile(regex)
|
|
return re.MatchString(email)
|
|
}
|