-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regular expression to validate email address for IDN #3620
Comments
If u can come up with a soultion then please post a better regx |
Universal regx solution is a very big. In addition to the variants that I suggested, you can try to use punycode converter for correct validate https://github.com/true/php-punycode And see look at how others have solved https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/string/punycode.php#L195 |
check latest commit |
I don't think filter_var with FILTER_VALIDATE_EMAIL supports IDNs. See https://bugs.php.net/bug.php?id=39469. Wouldn't an email with an IDN would still need converting first? |
Hi Daniel. May be create helper for validate email? Or add to settings tabs mail, field "regular expression to validate email" ??
Now expression not correct validate emails for Internationalized Domain Names!
Example. иван@почта.рф (for Russia) and امارات@امارات.اما.امارات (for Egipt) etc ...
This email fine work in gmail, but not work in opencart.
What do you think about this?
The text was updated successfully, but these errors were encountered: