This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(input): use Chromium's email validation regexp
This change uses the regexp from Chromium/Blink to validate emails, and corrects an error in the validation engine, which previously considered an invalid email to be valid. Additionally, the regexp was invalidating emails with capital letters, however this is not the behaviour recomended in the spec, or implemented in Chromium. Closes #5899 Closes #5924
- Loading branch information
79e519f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's likely not ok to allow emails like a@b because these validate as ok. :S
Shouldn't this regular expression at least require two part after @:
79e519f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on that regexp, you can see that there is no requirement for a top-level domain, and even based on the RFC itself.
79e519f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance this can be backported to v1.0.x ?
79e519f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should just be able to go into your version of angular.js and replace the regex expression, vin. It doesn't look like anything else changed.
79e519f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
79e519f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vin it's technically possible to do by creating a branch from a particular tag and backporting the fixes in, but to get that on the CDN someone internal to google would have to deal with that, and we'd have to discuss how we want to deal with support for older versions.
I think it's a good discussion to have, but we don't really have like an ESR programme at the moment, and most of the energy is not going to be going into maintaining older releases, unless we get a lot more help with it. (Keep in mind, this is just my opinion, but it's not an easy thing to do)