<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Dominic Sayers website - Latest Comments in Dominic Sayers - RFC-compliant email address validator</title><link>http://dominicsayers.disqus.com/</link><description></description><atom:link href="https://dominicsayers.disqus.com/dominic_sayers_rfc_compliant_email_address_validator_94/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 24 Feb 2011 13:48:30 -0000</lastBuildDate><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-155476580</link><description>&lt;p&gt;I didn't think the older version allowed IPv6 addresses. Must be mistaken.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Thu, 24 Feb 2011 13:48:30 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-155255475</link><description>&lt;p&gt;My hosting provider, JustHost, claims to be running PHP 5.2.16&lt;/p&gt;&lt;p&gt;What makes you think it's the 5.3.3+ filter_var()?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Thu, 24 Feb 2011 04:08:59 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-155231032</link><description>&lt;p&gt;Hi Dominic, just thought I'd mention that PHP's native filter_var() function from 5.2.0 - 5.3.2 is different the the function from 5.3.3 onwards. I believe you're using the 5.3.3+ version (not 5.2.0 as labelled above)?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Thu, 24 Feb 2011 02:01:47 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-154139899</link><description>&lt;p&gt;You must have been using the simple expression I offered at the end of the article for those who just want to allow standard dot-atom@domain-name addresses.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Tue, 22 Feb 2011 13:56:57 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-154122632</link><description>&lt;p&gt;Hi Michael,&lt;/p&gt;&lt;p&gt;I grabbed some code off &lt;a href="http://squiloople.com" rel="nofollow noopener" target="_blank" title="squiloople.com"&gt;squiloople.com&lt;/a&gt; today. I'll have a closer look at what I'm using as soon as I can. I'm just doing an RFC 5321 validation here.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Tue, 22 Feb 2011 13:21:58 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-154121317</link><description>&lt;p&gt;Or, sorry, if you're not allowing obsolete local-parts, isValid5321:&lt;/p&gt;&lt;p&gt;  function isValid5321($emailAddress)&lt;br&gt;  {&lt;br&gt;    return preg_match('/^(?&amp;gt;([!#-\'*+\/-9=?^-~-]+)(?&amp;gt;\.(?1))*|"(?&amp;gt;[ !#-\[\]-~]|\\\[ -~])*")@(?&amp;gt;([a-z0-9](?&amp;gt;[a-z0-9-]*[a-z0-9])?)(?&amp;gt;\.(?2)){0,126}|\[(?:(?&amp;gt;IPv6:(?&amp;gt;([a-f0-9]{1,4})(?&amp;gt;:(?3)){7}|(?!(?:.*[a-f0-9][:\]]){8,})((?3)(?&amp;gt;:(?3)){0,6})?::(?4)?))|(?&amp;gt;(?&amp;gt;IPv6:(?&amp;gt;(?3)(?&amp;gt;:(?3)){5}:|(?!(?:.*[a-f0-9]:){6,})(?5)?::(?&amp;gt;((?3)(?&amp;gt;:(?3)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?&amp;gt;\.(?6)){3}))\])$/iD', $emailAddress);&lt;br&gt;  }&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Tue, 22 Feb 2011 13:19:03 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-154117944</link><description>&lt;p&gt;Hi Dominic. Just wondering why my function is returning false in your tests. I've done my own and it passes them (except the "address too long" failures which I expect). Are you using isValid5322?&lt;/p&gt;&lt;p&gt;  function isValid5322($emailAddress)&lt;br&gt;  {&lt;br&gt;    return preg_match('/^((?&amp;gt;(?&amp;gt;(?&amp;gt;((?&amp;gt;[	 ]+(?&amp;gt;\x0D\x0A[	 ]+)*)?)(\((?&amp;gt;(?2)(?&amp;gt;[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)([!#-\'*+\/-9=?^-~-]+|"(?&amp;gt;(?2)(?&amp;gt;[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*(?2)")(?&amp;gt;(?1)\.(?1)(?4))*(?1)@(?1)(?&amp;gt;([a-z0-9](?&amp;gt;[a-z0-9-]*[a-z0-9])?)(?&amp;gt;(?1)\.(?1)(?5)){0,126}|\[(?:(?&amp;gt;IPv6:(?&amp;gt;([a-f0-9]{1,4})(?&amp;gt;:(?6)){7}|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?&amp;gt;:(?6)){0,6})?::(?7)?))|(?&amp;gt;(?&amp;gt;IPv6:(?&amp;gt;(?6)(?&amp;gt;:(?6)){5}:|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?&amp;gt;((?6)(?&amp;gt;:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?&amp;gt;\.(?9)){3}))\])(?1)$/isD', $emailAddress);&lt;br&gt;  }&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Tue, 22 Feb 2011 13:11:44 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-153955946</link><description>&lt;p&gt;Version 3.0 released today, 22nd February 2011. All feedback gratefully received.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Tue, 22 Feb 2011 08:19:29 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-153955327</link><description>&lt;p&gt;I've released version 3.0, which deals with this correctly: &lt;a href="http://www.dominicsayers.com/source/is_email/test/?address=%22%E2%96%88%22%40example.com" rel="nofollow noopener" target="_blank" title="http://www.dominicsayers.com/source/is_email/test/?address=%22%E2%96%88%22%40example.com"&gt;http://www.dominicsayers.co...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Tue, 22 Feb 2011 08:18:57 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-147050117</link><description>&lt;p&gt;The validator catches utf-8 characters ( "русский"@example.com ), but says stuff like the following as valid (with a quoted-string warning):&lt;/p&gt;&lt;p&gt;"abçd èfg"@example.com&lt;/p&gt;&lt;p&gt;"█"@example.com&lt;/p&gt;&lt;p&gt;Are you sure extended ASCII characters are valid inside quoted strings?&lt;/p&gt;&lt;p&gt;see: &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.mail.mailaddress(VS.90).aspx" rel="nofollow noopener" target="_blank" title="http://msdn.microsoft.com/en-us/library/system.net.mail.mailaddress(VS.90).aspx"&gt;http://msdn.microsoft.com/e...&lt;/a&gt; &lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg</dc:creator><pubDate>Tue, 15 Feb 2011 00:52:32 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-77468314</link><description>&lt;p&gt;Yes, that's a bit hard to reconcile with the EBNF that says the local part can end in CFWS and the domain can begin with CFWS.&lt;/p&gt;&lt;p&gt;I think we have to go with the EBNF since the meaning of the text is unclear. One of my design goals is to avoid false positives (i.e. rejecting addresses that are in fact valid).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Tue, 14 Sep 2010 03:48:23 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-76794920</link><description>&lt;p&gt;I'm a little confused over this passage in RFC 5322:&lt;/p&gt;&lt;p&gt;'Comments and folding white space SHOULD NOT be used around the "@" in the addr-spec.'&lt;/p&gt;&lt;p&gt;Presumably this disallows pete(his account)@silly.test(his host), and yet this is given in the RFC as a valid address (and the form allowed by your validator). Are you able to clarify?&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Fri, 10 Sep 2010 18:48:55 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-76644564</link><description>&lt;p&gt;Revision 2.2 uploaded with revised tests (much work contributed by Daniel Marschall)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Fri, 10 Sep 2010 07:53:07 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-68693245</link><description>&lt;p&gt;filter_var() uses my regex to validate emails? I didn't know. I'm surprised (and proud).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Sat, 14 Aug 2010 05:50:01 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-68499324</link><description>&lt;p&gt;Turns out filter_var() uses a regex. It doesn't understand comments and FWS. Here's the notes from the PHP source code:&lt;/p&gt;&lt;p&gt;        * The regex below is based on a regex by Michael Rushton.&lt;br&gt;503	         * However, it is not identical.  I changed it to only consider routeable&lt;br&gt;504	         * addresses as valid.  Michael's regex considers a@b a valid address&lt;br&gt;505	         * which conflicts with section 2.3.5 of RFC 5321 which states that:&lt;br&gt;506	         *&lt;br&gt;507	         *   Only resolvable, fully-qualified domain names (FQDNs) are permitted&lt;br&gt;508	         *   when domain names are used in SMTP.  In other words, names that can&lt;br&gt;509	         *   be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed&lt;br&gt;510	         *   in Section 5) are permitted, as are CNAME RRs whose targets can be&lt;br&gt;511	         *   resolved, in turn, to MX or address RRs.  Local nicknames or&lt;br&gt;512	         *   unqualified names MUST NOT be used.&lt;br&gt;513	         *&lt;br&gt;514	         * This regex does not handle comments and folding whitespace.  While&lt;br&gt;515	         * this is technically valid in an email address, these parts aren't&lt;br&gt;516	         * actually part of the address itself.&lt;br&gt;517	         *&lt;br&gt;518	         * Michael's regex carries this copyright:&lt;br&gt;519	         *&lt;br&gt;520	         * Copyright © Michael Rushton 2009-10&lt;br&gt;521	         * &lt;a href="http://squiloople.com/" rel="nofollow noopener" target="_blank" title="http://squiloople.com/"&gt;http://squiloople.com/&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Fri, 13 Aug 2010 09:16:22 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-68498291</link><description>&lt;p&gt;This is new from PHP 5.2 isn't it?&lt;/p&gt;&lt;p&gt;I'll add it to my tests when I get chance. Thanks for pointing it out.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Fri, 13 Aug 2010 09:12:46 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-68497058</link><description>&lt;p&gt;Hi Daniel,&lt;/p&gt;&lt;p&gt;Are you sure you're including the NUL (char(0)) character in what you're testing? It's hard to include this in the XML document. The point of the test is to ensure that a NUL character invalidates the address even if it is escaped.&lt;/p&gt;&lt;p&gt;D.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Fri, 13 Aug 2010 09:08:50 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-65793273</link><description>&lt;p&gt;I would be interested to know how the built-in filter_var() function does.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mike</dc:creator><pubDate>Mon, 02 Aug 2010 21:21:19 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-63080242</link><description>&lt;p&gt;NOYB,&lt;/p&gt;&lt;p&gt;While attempting to verify claims of 100% correctness in any pursuit is to be commended, your repeated combative posts here in contrast with Dominic's politeness in response not only makes you look like a jerk, but given the sterile technical nature of the topic it also calls into question your acumen. How you present information affects how it is received, and I'm sure I'm not the only reader suspicious of the value and intention of your contributions here. You might consider adopting a more respectful tone in kind with Dominic, and thanking him for his patience with your attitude. That said, continue to criticize his work, as your technical objections have helped Dominic, in his notable patience, to improve it notwithstanding your rudeness.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Trevor</dc:creator><pubDate>Sun, 18 Jul 2010 16:52:27 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-58262123</link><description>&lt;p&gt;Heh&lt;br&gt;I used to have a lot of &amp;lt;myname&amp;gt;+sitename@mydomain.com addresses. And they used to work. It makes it easy to filter out and process mail faster.&lt;br&gt;So now I have a bunch of accounts with a + in my e-mail address, and they won't allow me to log in anymore because they decided that it's an invalid e-mail address...&lt;br&gt;Really... I whish more people just use your script and stop trying to re-invent a BROKEN wheel.&lt;br&gt;Of course, after this validation, validity of the e-mail domain (check domain and such) is also important.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ard+dominicsayers</dc:creator><pubDate>Wed, 23 Jun 2010 12:20:49 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-56578423</link><description>&lt;p&gt;Mh, I assume that these results are not dynamically generated... On my test with the newest version, your solution failed at test #227 and Henderson's solution failed at tests #21, #164 and #227. Both #227 test are not red in this table, so I think these tests are older. Since your page is PHP-generated, wouldn't it be great if you are performing these tests on-demand?&lt;/p&gt;&lt;p&gt;Maybe it would be also useful if you put the testcase-number in front of the mailaddress, so the users do not need to search them with the mouse-hover-hint.&lt;/p&gt;&lt;p&gt;Regards&lt;br&gt;Daniel Marschall&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Marschall</dc:creator><pubDate>Sun, 13 Jun 2010 20:36:11 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-54642036</link><description>&lt;p&gt;I'm still pondering this one. If you &amp;amp; Cal are right (and you may well be) I'll try to find time to make the change.&lt;/p&gt;&lt;p&gt;Feel free to have a go yourself...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Fri, 04 Jun 2010 11:15:45 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-54566357</link><description>&lt;p&gt;That's good to hear.&lt;/p&gt;&lt;p&gt;And on another note, I wonder if you'd had a chance to consider case #164. This is from RFC 5322:&lt;/p&gt;&lt;p&gt;domain-literal  =   [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS]&lt;/p&gt;&lt;p&gt;Comments are allowed?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael</dc:creator><pubDate>Fri, 04 Jun 2010 07:03:10 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-53516407</link><description>&lt;p&gt;I've updated is_email() and the tests to reflect the fact that the IETF have now verified my erratum to RFC 3696.&lt;/p&gt;&lt;p&gt;This means that the maximum length of an email address is now *officially* 254 characters :-)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dominic Sayers</dc:creator><pubDate>Wed, 02 Jun 2010 08:12:39 -0000</pubDate></item><item><title>Re: Dominic Sayers - RFC-compliant email address validator</title><link>http://www.dominicsayers.com/isemail/results.php#comment-32779687</link><description>&lt;p&gt;Exactly. I noticed this a couple of days ago but verified only today and was going to complain right now. The comment on the test case says that RFC 5321 forbids comments in address literals, but as far as I understand ABNF rules in RFC 5321 assume comments and white space have already been folded, since comment tokens are not mentioned anywhere in the email address specification in section 4.1.2. On the other hand, RFC 5322 does define where comments are allowed and indeed allows a CFWS token before the address/domain literal, as well as after the quotation mark in the quoted-string token, thus making the email address "foo"(yay)@(hoopla)[1.2.3.4] of test case #164 valid.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oleg Oshmyan</dc:creator><pubDate>Fri, 05 Feb 2010 16:04:44 -0000</pubDate></item></channel></rss>