created: utils package

This commit is contained in:
nquidox 2025-07-06 22:21:32 +03:00
parent f4c4065812
commit 5ffb6dde46
4 changed files with 52 additions and 0 deletions

8
pkg/utils/isEmail.go Normal file
View file

@ -0,0 +1,8 @@
package utils
import "regexp"
func (u *Utils) IsEmail(email string) bool {
re := regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`)
return re.MatchString(email)
}