docs icon indicating copy to clipboard operation
docs copied to clipboard

underscore before @

Open ezin82 opened this issue 7 years ago • 2 comments

Validation fails when addresses have underscore before @ For example:

[email protected]

[email protected]

But these are valid e-mail addresses


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ezin82 avatar Dec 06 '18 16:12 ezin82

Thanks for your feedback @ezin82. @Thraka was already working on some updates to this topic, so he'll investigate this.

mairaw avatar Dec 10 '18 22:12 mairaw

@ezin82 Hi! After pondering this and #5305 and #7184 for a while, I've decided not to fix this. There are many discussions on the internet about using regex for email validation and how it seems almost impossible to get the "perfect" regex.

There are many other valid things you can put in that email validation test that actually fail. This sample isn't meant to be the best email validation test, it's simply meant to be there as an example.

You'll need to customize the regex to fit your needs, or find another validation regex to use in its place.

  • https://codereview.stackexchange.com/questions/77072/regex-to-match-email-address
  • https://softwareengineering.stackexchange.com/questions/78353/how-far-should-one-take-e-mail-address-validation/78363#78363
  • https://www.regular-expressions.info/email.html
  • https://davidcel.is/posts/stop-validating-email-addresses-with-regex/
  • https://hackernoon.com/the-100-correct-way-to-validate-email-addresses-7c4818f24643

Thraka avatar Dec 11 '18 18:12 Thraka