<?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: Validation in Depth &#8211; a retort to using just regular expressions</title>
	<atom:link href="http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/</link>
	<description>php, linux, pear, mysql etc etc</description>
	<lastBuildDate>Fri, 21 Oct 2011 21:08:12 +0100</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
	<item>
		<title>By: kenguest</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-214250</link>
		<dc:creator>kenguest</dc:creator>
		<pubDate>Tue, 17 Mar 2009 23:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-214250</guid>
		<description>I&#039;ve only just now had a look at the CPAN equivalent - it certainly seems a lot more comprehensive: tests for private/public/loopback/testnet/linklocal addresses. This certainly leaves the Check_IP[2] and Validate for dust!

I wouldn&#039;t be too worried about whether you&#039;re current standard of code/development is up to scratch; speaking as a member of the PEAR community, we&#039;re generally quick to give a friendly pointer on how something could be improved; and for major gaffes there&#039;s always the PHP_CodeSniffer package that you can use to check that your code adheres to the PEAR (and other) Coding Standards.

Your contributions don&#039;t even have to be code - you could, for example, log suggestions against a likely package asking for better functionality; helping out with writing documentation.

Thanks for the pointer ;-)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve only just now had a look at the CPAN equivalent &#8211; it certainly seems a lot more comprehensive: tests for private/public/loopback/testnet/linklocal addresses. This certainly leaves the Check_IP[2] and Validate for dust!</p>
<p>I wouldn&#8217;t be too worried about whether you&#8217;re current standard of code/development is up to scratch; speaking as a member of the PEAR community, we&#8217;re generally quick to give a friendly pointer on how something could be improved; and for major gaffes there&#8217;s always the PHP_CodeSniffer package that you can use to check that your code adheres to the PEAR (and other) Coding Standards.</p>
<p>Your contributions don&#8217;t even have to be code &#8211; you could, for example, log suggestions against a likely package asking for better functionality; helping out with writing documentation.</p>
<p>Thanks for the pointer <img src='http://blogs.linux.ie/kenguest/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scott</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-214203</link>
		<dc:creator>scott</dc:creator>
		<pubDate>Tue, 17 Mar 2009 18:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-214203</guid>
		<description>There are multiple levels of IP address validation.

Sadly, PEAR lacks an equivalent to the Perl CPAN module Data::Validate::IP.

Filling this void is something I&#039;d like to do, except I&#039;m swamped right now, and while my PHP is acceptable, I know I&#039;m not exactly writing PEAR/CPAN module-quality code.</description>
		<content:encoded><![CDATA[<p>There are multiple levels of IP address validation.</p>
<p>Sadly, PEAR lacks an equivalent to the Perl CPAN module Data::Validate::IP.</p>
<p>Filling this void is something I&#8217;d like to do, except I&#8217;m swamped right now, and while my PHP is acceptable, I know I&#8217;m not exactly writing PEAR/CPAN module-quality code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenguest</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-147382</link>
		<dc:creator>kenguest</dc:creator>
		<pubDate>Tue, 03 Jun 2008 12:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-147382</guid>
		<description>@Aisling:
very kind of you to think so ;-)</description>
		<content:encoded><![CDATA[<p>@Aisling:<br />
very kind of you to think so <img src='http://blogs.linux.ie/kenguest/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aisling</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-146432</link>
		<dc:creator>Aisling</dc:creator>
		<pubDate>Fri, 30 May 2008 13:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-146432</guid>
		<description>Well done Ken ! You are the true guru of PHP !!</description>
		<content:encoded><![CDATA[<p>Well done Ken ! You are the true guru of PHP !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel O'Connor</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-145685</link>
		<dc:creator>Daniel O'Connor</dc:creator>
		<pubDate>Tue, 27 May 2008 16:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-145685</guid>
		<description>Well, there goes mine too.

Ken; do you think we could make a:
Validate::assertBlogCommentViewPointIsAcceptable($my_world_view, $comment)

?</description>
		<content:encoded><![CDATA[<p>Well, there goes mine too.</p>
<p>Ken; do you think we could make a:<br />
Validate::assertBlogCommentViewPointIsAcceptable($my_world_view, $comment)</p>
<p>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-145650</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 27 May 2008 13:59:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-145650</guid>
		<description>Richard Heyes comes across as a bit of a clown. After his amazing blogging entry filling us in on one of the best kept secrets of php http://www.phpguru.org/#295 I asked if he would mind not spamming the planet php feed with trivial articles or pricing changes for his commercial services (although i would be surprised if he has any customers) but my suggestions were met with total derision.

Im not at all surprised he would do something like deleting your posts.</description>
		<content:encoded><![CDATA[<p>Richard Heyes comes across as a bit of a clown. After his amazing blogging entry filling us in on one of the best kept secrets of php <a href="http://www.phpguru.org/#295" rel="nofollow">http://www.phpguru.org/#295</a> I asked if he would mind not spamming the planet php feed with trivial articles or pricing changes for his commercial services (although i would be surprised if he has any customers) but my suggestions were met with total derision.</p>
<p>Im not at all surprised he would do something like deleting your posts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean Clatworthy</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-145638</link>
		<dc:creator>Dean Clatworthy</dc:creator>
		<pubDate>Tue, 27 May 2008 13:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-145638</guid>
		<description>Within my models I define a validation array, and you can define whether it&#039;s a required field, whether you want to do a simple regex validation or something more in depth. You can pass in a third paramater to the field e.g.

array(&#039;field_name&#039; =&gt; array(REQUIRED, ADVANCED))

^^ pseudo code

By setting the advanced param to true it checks the model for a function called verify_field_name and passed in the $value. This allows for more advanced validation. That is where I then can perform application logic like checking foreign keys exist, and passing in values to more complex validation routines like the PEAR packages you suggested :)

Thanks for the heads up on Validate_UK btw ;)</description>
		<content:encoded><![CDATA[<p>Within my models I define a validation array, and you can define whether it&#8217;s a required field, whether you want to do a simple regex validation or something more in depth. You can pass in a third paramater to the field e.g.</p>
<p>array(&#8216;field_name&#8217; =&gt; array(REQUIRED, ADVANCED))</p>
<p>^^ pseudo code</p>
<p>By setting the advanced param to true it checks the model for a function called verify_field_name and passed in the $value. This allows for more advanced validation. That is where I then can perform application logic like checking foreign keys exist, and passing in values to more complex validation routines like the PEAR packages you suggested <img src='http://blogs.linux.ie/kenguest/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for the heads up on Validate_UK btw <img src='http://blogs.linux.ie/kenguest/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenguest</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-145604</link>
		<dc:creator>kenguest</dc:creator>
		<pubDate>Tue, 27 May 2008 10:51:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-145604</guid>
		<description>Hi Robin,
that&#039;s true and as far as I can tell the Net_CheckIP packages validate IPv4 addresses, not IPv6 ones.</description>
		<content:encoded><![CDATA[<p>Hi Robin,<br />
that&#8217;s true and as far as I can tell the Net_CheckIP packages validate IPv4 addresses, not IPv6 ones.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin Mehner</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-145602</link>
		<dc:creator>Robin Mehner</dc:creator>
		<pubDate>Tue, 27 May 2008 10:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-145602</guid>
		<description>Hi there,

why not use ip2long / long2ip for IP Validation? It&#039;s builtin in PHP and if you only want to validate IPv4 addresses it should be sufficient.

The only point that I see, is that you don&#039;t want to have &quot;127.0.0&quot; (which will be converted to 127.0.0.0) as valid address.</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>why not use ip2long / long2ip for IP Validation? It&#8217;s builtin in PHP and if you only want to validate IPv4 addresses it should be sufficient.</p>
<p>The only point that I see, is that you don&#8217;t want to have &#8220;127.0.0&#8243; (which will be converted to 127.0.0.0) as valid address.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenguest</title>
		<link>http://blogs.linux.ie/kenguest/2008/05/26/validation-in-depth-a-retort-to-using-just-regular-expressions/comment-page-1/#comment-145596</link>
		<dc:creator>kenguest</dc:creator>
		<pubDate>Tue, 27 May 2008 09:02:36 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.linux.ie/kenguest/?p=172#comment-145596</guid>
		<description>Pádraic, I&#039;m not sure that I would port them to ZF - is it not possible to simply import/reference third party packages, such as PEAR packages in this instance, in ZF? I suppose this is precisely what you are doing, come to think of it.

At least that way there is no divergence involved and bug fixes as well as additional functionality would only have to be coded just once.</description>
		<content:encoded><![CDATA[<p>Pádraic, I&#8217;m not sure that I would port them to ZF &#8211; is it not possible to simply import/reference third party packages, such as PEAR packages in this instance, in ZF? I suppose this is precisely what you are doing, come to think of it.</p>
<p>At least that way there is no divergence involved and bug fixes as well as additional functionality would only have to be coded just once.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
