Posted
over 14 years
ago
by
Dominic
I’ve made an email address validation service powered by the free PHP function is_email(). What is a valid email address? There’s only one real answer to this: a valid email address is one that you can send emails to. There are acknowledged standards for what constitutes a valid email address. These are defined in the Request For [...]
|
Posted
almost 15 years
ago
by
Dominic
There's a test page here http://www.dominicsayers.com/source/beta/is_email/test where you can try your own favourite edge and corner cases.
|
Posted
about 15 years
ago
by
Dominic
My conclusion is this: my own validator is_email() will accept as valid any address that conforms to RFC 4291 (even though that is contradicted by RFC 5321). It will raise a warning if the double colon elides only one zero group.
|
Posted
about 15 years
ago
by
Dominic
This has allowed me to make it a true validator - it follows the RFCs as precisely as I can make it - without losing real-world usefulness.
is_email() version 2.1 was released yesterday. Try it. Let me know if it works for you.
|
Posted
over 16 years
ago
by
Dominic Sayers
I was turning a blind eye to the part of RFC5322 that allows you to put comments within an email address. But Cal H brought it up in an email so I had to bite the bullet.
|
Posted
over 16 years
ago
by
Dominic Sayers
I've released version 1.3 of my validator and you can download it with the test cases from Google Code.
|
Posted
over 16 years
ago
by
Dominic Sayers
Do you think this is a valid email address?
""@example.com
No, me neither.
|
Posted
over 16 years
ago
by
Dominic Sayers
I've also updated my own routine so that it still passes all the tests, of which there are now 158. As always, the full analysis is on my website and the latest version of the source code will always be in Google Code.
|
Posted
over 16 years
ago
by
Dominic Sayers
I have now released version 1.0 of my PHP email address validator. This version passes all 139 unit tests in the suite - tests I have collated from RFC 3696 and from articles by Dave Child, Doug Lovell and Phil Haack. Plus some of my own to test the IPv6 address format.
|
Posted
over 16 years
ago
by
Dominic Sayers
I've discovered a number of other public-domain functions that attempt to validate the format of an email address. I tried to validate my 124 test cases against these functions with interesting results
|