RFCs for email addresses are cool, but on the web we have our own standards!

https://html.spec.whatwg.org/multipage/input.html#valid-e-ma...

"This requirement is a willful violation of RFC 5322, which defines a syntax for email addresses that is simultaneously too strict (before the "@" character), too vague (after the "@" character), and too lax (allowing comments, whitespace characters, and quoted strings in manners unfamiliar to most users) to be of practical use here."

The regex is:

  /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/

Every browser implements this regex for .

Chromium:

https://source.chromium.org/chromium/chromium/src/+/main:thi...

WebKit:

https://github.com/WebKit/WebKit/blob/0d7afc5a45c140c44497a8...

Yes, do verify email addresses by sending a confirmation link if you bind users to their email addresses, though. Don't confuse validation with verification.

If you really want to take validation seriously, why not add a human element to it, and not design one line of code to try to fix everything?

One of the biggest problems with email input is typos -- and there are some very common typos that could easily be accounted for with code. For example [email protected], [email protected], foo@comcast, etc.

It should be common, when these types of typos occur, to prompt the user to fix them. Unfortunately, this is quite rare.

OP has shared a solution for typo fix in the closing remarks of the blog: https://github.com/mailcheck/mailcheck