mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-10 10:06:37 +00:00
Allow for non-ascii chars as valid emails chars
This commit is contained in:
@@ -157,10 +157,6 @@ class EmailLexer extends AbstractLexer
|
||||
return self::INVALID;
|
||||
}
|
||||
|
||||
if (preg_match('/[\x7f-\xff]+/', $value)) {
|
||||
throw new \InvalidArgumentException(sprintf('There is no token with value %s.', json_encode($value)));
|
||||
}
|
||||
|
||||
return self::GENERIC;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ class EmailValidatorTest extends \PHPUnit_Framework_TestCase
|
||||
array('fab\'ien@symfony.com'),
|
||||
array('example((example))@fakedfake.co.uk'),
|
||||
array('example@faked(fake).co.uk'),
|
||||
array('fabien+@symfony.com'),
|
||||
array('инфо@письмо.рф'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user