Skip to content
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

Improve flexibility of email validation in the ValidationHelper #7310

Merged
merged 2 commits into from Jan 20, 2021

Conversation

olicooper
Copy link
Contributor

@olicooper olicooper commented Jan 18, 2021

Resolves #7265

WHATWG state that the rules defined by RFC5322 are not good enough. They offer an alternative regex which they say violates the standard, but it works better. See https://html.spec.whatwg.org/#valid-e-mail-address

Instead of using two properties EmailRegex and StrictEmailRegex, I propose we simply update the current regex and use a more inclusive regex. If you think we should include both then I will update the PR to include both and use the W3C regex for the less strict one. I have updated the tests to include a test for admin@localhost, which now passes. The old 1024x768@60hz test would have passed for the same reason so I remove it.

* ValidationHelper.EmailRegEx can now be modified to suit the users needs
* Regex updated to be more inclusive - see https://html.spec.whatwg.org/#valid-e-mail-address
@olicooper olicooper marked this pull request as ready for review January 18, 2021 14:29
@maliming maliming added this to the 4.3-preview milestone Jan 19, 2021
@maliming
Copy link
Member

@hikalkan What do you think?

@maliming maliming removed their request for review January 20, 2021 02:04
@hikalkan
Copy link
Member

I think that seems fine.

@hikalkan hikalkan merged commit be54793 into abpframework:dev Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login fails for 'admin@localhost' due to incorrect email validation
3 participants