utils.go 190 B

12345678910
  1. package utils
  2. import (
  3. "regexp"
  4. )
  5. func EmailIsValid(email string) bool {
  6. regexpe := regexp.MustCompile(`^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,4}$`)
  7. return regexpe.MatchString(email)
  8. }