fix: Relaxed email validation

- because unicode tlds / domains are such a great idea
pull/2669/head
iglocska 2017-11-22 13:45:39 +01:00
parent f259a51247
commit 325ca46871
1 changed files with 1 additions and 1 deletions

View File

@ -935,7 +935,7 @@ class Attribute extends AppModel {
case 'dns-soa-email':
case 'jabber-id':
// we don't use the native function to prevent issues with partial email addresses
if (preg_match("#^[A-Z0-9._&%$+-=~]*@[A-Z0-9.\-_]+\.[A-Z0-9\-]{2,}$#i", $value)) {
if (preg_match("#^.*\@.*\..*$#i", $value)) {
$returnValue = true;
} else {
$returnValue = 'Email address has an invalid format. Please double check the value or select type "other".';