Outbound Wiki

Article

The 100% correct way to validate email addresses - Medium

david-gilbertson.medium.com

Open at publisher

Quoted on this wiki

Every place a page here uses this source, in the order the words come in it.

  1. Congratulations. From this day forward, you will no longer squander your time trying to work out the perfect regex to validate email addresses. You will also never again run the risk of rejecting what is, in fact, a strange, valid email address. “The trick is to first define what we mean by ‘valid’.” We are developers, we are technical folk, so it’s no surprise that the prevailing wisdom is to check that it matches the official criteria, some examples of the diversity of the official criteria are…

    In Email address validation

  2. [epiphany] “I fail and be told my address isn’t valid when it is!” So what are the odds that any one typo would result in an invalid email address? We will build a statistical model! Let’s look at, say, the ‘g’. I am more likely to mis-type with a letter on the visible keyboard with no shift key required (I apply a weighting to non-modified keys in the model). From all of the tappable keys on a physical keyboard, there are six characters that, while not completely invalid, are only valid in certain cases: []\;, and space. 6 out of 48. A 12% chance.

    In Verification result handling

Quotes are verbatim and belong to their publishers. Where a quote has been translated, the original wording is kept below it.