I couldn't buy a car because my email address was 'invalid'
shaungallagher.pressbin.com
shaungallagher.pressbin.com
On the backend send an email and let the user confirms.
But I think if you take "local" out of the equation, as you would for customer emails, you can validate a bit more. You might be able to validate on a single @ being in there somewhere, with something before and after it, maybe look for a period after the @ for "addr@domain.tld" as I think every external address needs a dotted domain.
That's about as far as I think you can safely go. Anything else is legal.
> as I think every external address needs a dotted domain.
Something like example@com is technically a valid email address; although I don't know if there are any TLDs which accept emails.
I don't think I've ever seen a bare TLD in real life like that though--maybe very early on as DNS became a thing? Not since the web though.
I usually just recommend people don't validate email addys and let the email verification message do the job for you. This is pretty much why.
However, at least they had the decency not to hardcore the TLD list. I used to have a .eu email and it would get rejected rather often, even years after the TLD came out.
If you're using Chrome (65+), you can easily bypass any validations/logic by using local overrides (https://developers.google.com/web/updates/2018/01/devtools#o...). As marcolussetti said, it's worth trying out.
Yes, I'm sure the author could go register random_boy_8786@hotmail.com, but it's really a post about incorrect assumptions.
This blog should really be understood as another in the "falsehoods programmers believe about..." series.
...oh, this was online only. Well there's your problem.