From dc2dc2108f64efc2aeb3f9b78eb59a482c5c2b67 Mon Sep 17 00:00:00 2001 From: Reza Date: Tue, 19 Mar 2024 12:00:46 +0100 Subject: [PATCH] email validator --- lib/validation/validators.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/validation/validators.go b/lib/validation/validators.go index 20152e7..1710262 100644 --- a/lib/validation/validators.go +++ b/lib/validation/validators.go @@ -284,7 +284,7 @@ func alphaNumericValidator(match []string, value *generic.Value) error { return nil } -var emailRegex = regexp.MustCompile(`(?i)^[a-z0-9_-]{2,}(\+\d+)?@[a-z0-9_-]{2,}\.[a-z0-9]{2,}$`) +var emailRegex = regexp.MustCompile(`(?i)^[a-z0-9_\-.]{2,}(\+\d+)?@[a-z0-9_-]{2,}\.[a-z0-9]{2,}$`) func emailValidator(match []string, value *generic.Value) error { var v = value.String()