Email address validation 1.0


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.

Quick links: Source code | Email address validators head-to-head

Advertisements

0 Responses to “Email address validation 1.0”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: