-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[EmailValidator] Need to be upgraded #4930
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
Comments
Wouldn't it better if that was fixed upstream in PHP instead? Can you create a ticket on php.net? |
The ticket exists since 2011-10-07 https://bugs.php.net/bug.php?id=55865. |
Well as the validator accepts Punycode, the best possible way is extract the domain part. At least until its fixed upstream. |
Solved by PR #9140 |
…ncy (egulias) This PR was squashed before being merged into the 2.5-dev branch (closes #9140). Discussion ---------- [Validator][Email] - Strict validation and soft dependency | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #1581, #4930 | License | MIT | Doc PR | symfony/symfony-docs#3469 TODO --------- - [x] submit changes to the documentation - [x] document the BC breaks - [x] finish the code - [x] gather feedback for my changes In #1581 @bschussek suggested to pass the strict_email config to `Validator\EmailValidator::__construct($strict)`, I did not put it there yet since the constraint can receive that configuration each time the constraint is used despite the fact of the global configuration. This could lead to some logic in the constructor and I wanted first to integrate the strict validator. BC Break -------------- I'm not sure of this, but as a soft dependency is added and now some emails that where valid before no longer are I thought it is. Commits ------- 3368630 #1581 - Strict in Email constraint and use of Egulias\EmailValidator
Email address must to be forced thru punycode converter before filter_var validation. In example "инфо@письмо.рф" is a valid email address, but filter_var returns false.
$ php -r "var_dump(filter_var('инфо@письмо.рф', FILTER_VALIDATE_EMAIL));"
http://en.wikipedia.org/wiki/Punycode
The text was updated successfully, but these errors were encountered: