From 8aeb349eeb852aaf931766f37830e9f335b2773e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Tome=C4=8Dek?= Date: Fri, 4 Oct 2024 13:10:02 +0200 Subject: [PATCH] email validator accepts domain both long and with unicode --- haxe/ui/validators/EmailValidator.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haxe/ui/validators/EmailValidator.hx b/haxe/ui/validators/EmailValidator.hx index 3644a9d23..990dfd673 100644 --- a/haxe/ui/validators/EmailValidator.hx +++ b/haxe/ui/validators/EmailValidator.hx @@ -4,7 +4,7 @@ class EmailValidator extends PatternValidator { public function new() { super(); invalidMessage = "Invalid email address"; - pattern = ~/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/gm; + pattern = ~/^[^\-@\s:&!\/\\]+([\.-]?[^@\s:&!\/\\]+)*@[^\-@\s:&!\/\\\.]+([\.-]?[^@\s:&!\/\\\.]+)*(\.[^\-@\s:&!\/\\\.]{2,})+$/gm; //pattern = new EReg("^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$", "gm"); } } \ No newline at end of file