2 ms·
The only relevant email validation is verifying a user can click on a link or enter some code sent to them to the address specified by them. Without verifying o
by jillesvangurp 5y ago
The only relevant email validation is verifying a user can click on a link or enter some code sent to them to the address specified by them. Without verifying ownership, the email address is worthless as an identifier so making it conform to some syntax is not that relevant and you should not use unverified email addresses as identifiers (identity theft is a thing).
Obsessing about regular expressions for these addresses is generally a waste of time except for maybe preventing a lot of failed attempts to send stuff to a clearly invalid email address. A simple string contains '@' is probably good enough for that. Worst case the email address does not work and you discard the entered information after some reasonable time frame. The user has the option to try again and do a better job of typing their email address.