Improve flexibility of email validation in the ValidationHelper #7310
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andStrictEmailRegex
, 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 foradmin@localhost
, which now passes. The old1024x768@60hz
test would have passed for the same reason so I remove it.