<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A Better Postal/Zip Code Validation Method for CakePHP 1.2</title>
	<atom:link href="http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/</link>
	<description>A PHP web developer writing about the web.</description>
	<lastBuildDate>Mon, 26 Jul 2010 20:07:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Schaffer Riggs</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-4332</link>
		<dc:creator>Schaffer Riggs</dc:creator>
		<pubDate>Thu, 07 Jan 2010 22:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-4332</guid>
		<description>I found your blog on technorati and read a couple of of your previous posts. Keep up the good work. I just added up your RSS feed to my Yahoo News Reader. Looking forward to reading more from you down the road!</description>
		<content:encoded><![CDATA[<p>I found your blog on technorati and read a couple of of your previous posts. Keep up the good work. I just added up your RSS feed to my Yahoo News Reader. Looking forward to reading more from you down the road!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Guest&#8217;s Blog: A response to &#8220;Better Postal/Zip Code Validation Method for CakePHP 1.2&#8243; &#124; Development Blog With Code Updates : Developercast.com</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3918</link>
		<dc:creator>Ken Guest&#8217;s Blog: A response to &#8220;Better Postal/Zip Code Validation Method for CakePHP 1.2&#8243; &#124; Development Blog With Code Updates : Developercast.com</dc:creator>
		<pubDate>Thu, 17 Dec 2009 18:20:57 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3918</guid>
		<description>[...] response to a different post he read on a postal/zip code validation topic, Ken Guest has points out other resources that can be [...]</description>
		<content:encoded><![CDATA[<p>[...] response to a different post he read on a postal/zip code validation topic, Ken Guest has points out other resources that can be [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Guest&#8217;s Blog: A response to &#8220;Better Postal/Zip Code Validation Method for CakePHP 1.2&#8243; &#124; Webs Developer</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3917</link>
		<dc:creator>Ken Guest&#8217;s Blog: A response to &#8220;Better Postal/Zip Code Validation Method for CakePHP 1.2&#8243; &#124; Webs Developer</dc:creator>
		<pubDate>Thu, 17 Dec 2009 18:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3917</guid>
		<description>[...] response to a different post he read on a postal/zip code validation topic, Ken Guest has points out other resources that can be [...]</description>
		<content:encoded><![CDATA[<p>[...] response to a different post he read on a postal/zip code validation topic, Ken Guest has points out other resources that can be [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3905</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Thu, 17 Dec 2009 04:38:41 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3905</guid>
		<description>Thanks for the heads up, Mark - I admit I haven&#039;t had much time to check out 1.3 yet. I was planning to wait until it came out of beta to upgrade, at least on the high traffic production servers we have at work. But I guess that means I don&#039;t have to do a lighthouse ticket now. :)</description>
		<content:encoded><![CDATA[<p>Thanks for the heads up, Mark &#8211; I admit I haven&#8217;t had much time to check out 1.3 yet. I was planning to wait until it came out of beta to upgrade, at least on the high traffic production servers we have at work. But I guess that means I don&#8217;t have to do a lighthouse ticket now. <img src='http://jamienay.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3904</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Thu, 17 Dec 2009 04:23:05 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3904</guid>
		<description>check out the new cake1.3 branches
there localized validation is already supported by using different classes
they can be stored in app/libs/localized/XY_validation.php
whereas XY would be your country code</description>
		<content:encoded><![CDATA[<p>check out the new cake1.3 branches<br />
there localized validation is already supported by using different classes<br />
they can be stored in app/libs/localized/XY_validation.php<br />
whereas XY would be your country code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3881</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Tue, 15 Dec 2009 16:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3881</guid>
		<description>Abba - good call on the lighthouse ticket. I just might do that today (if you haven&#039;t already).</description>
		<content:encoded><![CDATA[<p>Abba &#8211; good call on the lighthouse ticket. I just might do that today (if you haven&#8217;t already).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3880</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Tue, 15 Dec 2009 16:14:58 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3880</guid>
		<description>Hi Ken - I posted almost the same response on your blog, but I wanted to repeat much of what I said for the benefit of the readers here.

As my post implies, I was addressing a deficiency with the CakePHP framework&#039;s postal validation code. So, my solution is based on the existing Validation::postal() method that comes with CakePHP. While PEAR is a good solution, it was beyond the scope of my article to suggest scrapping Cake&#039;s entire Validation class in favour of another library. I used the existing regular expressions (from the Cake method), which is why 000000 validates as a US postal code. I might suggest it&#039;s beyond the scope of a data format validator to decide whether a postal code is &#039;real&#039; anyway.</description>
		<content:encoded><![CDATA[<p>Hi Ken &#8211; I posted almost the same response on your blog, but I wanted to repeat much of what I said for the benefit of the readers here.</p>
<p>As my post implies, I was addressing a deficiency with the CakePHP framework&#8217;s postal validation code. So, my solution is based on the existing Validation::postal() method that comes with CakePHP. While PEAR is a good solution, it was beyond the scope of my article to suggest scrapping Cake&#8217;s entire Validation class in favour of another library. I used the existing regular expressions (from the Cake method), which is why 000000 validates as a US postal code. I might suggest it&#8217;s beyond the scope of a data format validator to decide whether a postal code is &#8216;real&#8217; anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A response to &#8220;Better Postal/Zip Code Validation Method for CakePHP 1.2&#8243; &#171; Ken Guest&#8217;s online diary</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3876</link>
		<dc:creator>A response to &#8220;Better Postal/Zip Code Validation Method for CakePHP 1.2&#8243; &#171; Ken Guest&#8217;s online diary</dc:creator>
		<pubDate>Tue, 15 Dec 2009 13:59:40 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3876</guid>
		<description>[...] a few minutes ago I read Jamie Nay&#8217;s A Better Postal/Zip Code Validation Method for CakePHP 1.2 blog [...]</description>
		<content:encoded><![CDATA[<p>[...] a few minutes ago I read Jamie Nay&#8217;s A Better Postal/Zip Code Validation Method for CakePHP 1.2 blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Guest</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3875</link>
		<dc:creator>Ken Guest</dc:creator>
		<pubDate>Tue, 15 Dec 2009 13:35:23 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3875</guid>
		<description>Would it not make more sense, and save you time implementing, debugging and updating your own solution, by utilising PEAR&#039;s Validate class ( http://pear.php.net/package/Validate) and other associated classes such as Validate_UK, Validate_US etc? 

Also, you&#039;ve a bug in your code - it allows for US zipcodes that the United Stated Postal Service tool at http://zip4.usps.com/zip4/citytown_zip.jsp does not recognise, such as &#039;00000&#039; - unless this weak level of validation is intentional?</description>
		<content:encoded><![CDATA[<p>Would it not make more sense, and save you time implementing, debugging and updating your own solution, by utilising PEAR&#8217;s Validate class ( <a href="http://pear.php.net/package/Validate)" rel="nofollow">http://pear.php.net/package/Validate)</a> and other associated classes such as Validate_UK, Validate_US etc? </p>
<p>Also, you&#8217;ve a bug in your code &#8211; it allows for US zipcodes that the United Stated Postal Service tool at <a href="http://zip4.usps.com/zip4/citytown_zip.jsp" rel="nofollow">http://zip4.usps.com/zip4/citytown_zip.jsp</a> does not recognise, such as &#8217;00000&#8242; &#8211; unless this weak level of validation is intentional?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abba Bryant</title>
		<link>http://jamienay.com/2009/12/a-better-postal-zip-code-validation-method-for-cakephp-1-2/comment-page-1/#comment-3859</link>
		<dc:creator>Abba Bryant</dc:creator>
		<pubDate>Mon, 14 Dec 2009 22:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://jamienay.com/?p=480#comment-3859</guid>
		<description>Thanks for this, I had solved the same problem ( my company has clients in Canada and the United States and validating either type was a pain) in much the same way. Our code even looks 90% similar, which as I based mine on the original function I guess it should be expected.

Consider opening a ticket in the new cakephp lighthouse to allow for the validation of more than one localized piece of data. Would work for phone, postal codes, etc. Might be a worthwhile addition.</description>
		<content:encoded><![CDATA[<p>Thanks for this, I had solved the same problem ( my company has clients in Canada and the United States and validating either type was a pain) in much the same way. Our code even looks 90% similar, which as I based mine on the original function I guess it should be expected.</p>
<p>Consider opening a ticket in the new cakephp lighthouse to allow for the validation of more than one localized piece of data. Would work for phone, postal codes, etc. Might be a worthwhile addition.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
