3 ms·
Unpopular opinion: Just ignore these edge cases and focus on the 99.99% of the sane population that doesn't get off on having a weird email address. More gener
by bilater 5y ago
Unpopular opinion: Just ignore these edge cases and focus on the 99.99% of the sane population that doesn't get off on having a weird email address.
More generally: If an edge case exists and has nothing to do with accessibility (it was caused by a user having a different workflow like needing a screen reader or being in a less developed part of the world with slow internet) then you should dismiss them and not make your code/life unnecessarily complicated.
- jillesvangurp 5y agoThe 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.