Html code for validating email address

html code for validating email address-74html code for validating email address-27html code for validating email address-12

But this is one of those cases where the convenience and clarity may outweigh the dogma.

Per Stuart's comment, this compares the final address with the original string instead of always returning true.

The only way to truly verify whether an e-mail is valid is to send a test message.

Personally, I would say that you should just make sure there is an @ symbol in there, with possibly a . There's many regexes you could use of varying correctness, but I think most of these leave out valid email addresses, or let invalid ones through.

I guess you don't know what someone will put in there but a malicious person knows that the value may eventually be fed into your mail system.

Comments