Email Id Verification
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Thu May 24 20:46:50 EDT 2012
On Thu, 24 May 2012 05:32:16 -0700, niks wrote:
> Hello everyone..
> I am new to asp.net...
> I want to use Regular Expression validator in Email id verification..
Why do you want to write buggy code that makes your users hate your
program? Don't do it! Write good code, useful code! Validating email
addresses is the wrong thing to do.
The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO
IT. That is all. Just because an address is syntactically valid doesn't
mean it is deliverable.
You can't validate postal addresses. How would you even try? Even if you
could, you wouldn't use a regex for it. That's the post office's job to
decide whether mail can be delivered, not yours. Who are you to say that
some address in Russia or Bolivia or Kuwait is "invalid"?
Email addresses are no different. It is the job of the mail server to
decide whether email can be delivered, not yours.
http://northernplanets.blogspot.com.au/2007/03/how-not-to-validate-email-addresses.html
http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx
http://haacked.com/archive/2007/08/26/dont-be-a-validation-nazi.aspx
--
Steven
More information about the Python-list
mailing list