Jump to content

Email validation as fast and with as little code as possible?


LooieENG

Recommended Posts

To sanatize and to validate, are different things. Right now you are sanitizing it against possible injections. And that is the right way to do it. Might want to add 'trim();' to it too.

 

If you want to validate, make sure you check that the email contains '@' and '.com' or whatever.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.