logoalt Hacker News

ashley95today at 1:06 AM1 replyview on HN

This is cute and all. But for anyone coming here for real-world advice: just use a regex, normalize to lowercase, and surface any errors to users so they know if their email got rejected. This will avoid 99.9% of issues and work for 100% of real human users. This is what everyone else does, and if you have a user with an esoteric email, they will still be able to furnish another one that passes this validation.


Replies

piftoday at 1:24 AM

Display a warning and propose to edit instead of blocking the operation: your customers will be happier!