3 ms·
E-mail validation can be useful, but I would stay away from this thing. Look at what you are trying to do from a higher level. Most likely the user wants somet
by mosselman 14y ago
E-mail validation can be useful, but I would stay away from this thing. Look at what you are trying to do from a higher level.
Most likely the user wants something from you as well as you from them. If a user gives you a bad e-mail, despite a very basic e-mail regex, whatever, they won't get an e-mail, not my problem.
If it is to register on your website, just let them, send them a confirmation e-mail to their 'email', meanwhile allowing them to use the system (or not). Then if after x-time they haven't confirmed, just delete the user again. This will save you a lot of trouble.
If you want something more high-tech like checking a huge list of e-mails in a system you could go with a solution suggested below, just send them an e-mail.
Regex is evil!