Quick links: Source code | Email address validators head-to-head
OK, after some correspondence with Dave Child and Cal Henderson 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. The full analysis is on my website and the latest version of the source code will always be in Google Code.
I would really appreciate it if you find a valid address that fails my validator, or an invalid one that passes, if you would get in touch with me and let me know.
Here are the scores on the doors:
Dominic Sayers: 100% validated correctly Simon Slick: 86% Dave Child: 81% Phil Haack: 79% Cal Henderson: 71%
For the RFC nerds, this version now correctly validates the obsolete local form of word *(“.” word). In other words you can regard the local part of the address as a dot-delimited series of elements each of which can be separately quoted. This means that first.”last”@example.com is now recognised as a valid address.