Validator email - Not allowing international email (RFC 6531)
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
Current behavior
Using Validator.email with an international email (UTF-8 in the local part) is claiming that the email is invalid.
Expected behavior
Validator.email should accept valid emails as RFC 6531 suposes.
Minimal reproduction of the problem with instructions
- Create a basic form with a field including Validator.email
- Put an international email address like
müller@example.com
into the email field - Check validation
Example: https://stackblitz.com/edit/angular-gitter-cn98xo
What is the motivation / use case for changing the behavior?
The world is not just ASCII or english speaking, so emails with valid UTF-8 parts should work as well. Even hotmail is allowing international local parts like umlauts.
Environment
Angular version: 6.0.7, 6.1.0
Browsers: Irelevant, it is a regex issue
For Tooling issues:
- Node version: 8.9.4+
- Platform: Any
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Make email validator regex comply with RFC 6531
However, International characters above U+007F are permitted by RFC 6531 Because some mail servers seem to follow this standard, regex should ...
Read more >I Knew How To Validate An Email Address Until I Read The ...
1. Catch simple mistakes to make a better user experience. 2. Have a valid email address that can be used. 3. Make sure...
Read more >SMTP Extension for Internationalized Email RFC 6531
An extended overview of the extension model for internationalized email addresses and the email header appears in RFC 6530 [RFC6530], ...
Read more >Which is the official email RFC?
Nominally, 6531 itself states that the extension does not modify or amend the base specification. It codifies a mechanism whereby compliant ...
Read more >Testing Email Validation
Be aware when trying to prove that the validation of international letters exists because you have to prove that RFC 5336 (or even...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have the use case and customers with such emails, so yes: Even if it may not yet be in the WHATWG, it makes sense. I know I could just use another regex validator, but in my opinion it would make sense to adjust the validator that it matches the real world.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.