<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 15:11:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DZone.com: Zend_Validate for the win]]></title>
      <guid>http://www.phpdeveloper.org/news/15534</guid>
      <link>http://www.phpdeveloper.org/news/15534</link>
      <description><![CDATA[<p>
In <a href="http://css.dzone.com/articles/zendvalidate-win">this new post</a> to DZone.com today <i>Giorgio Sironi</i> looks at what he considers one of the more valuable yet underestimated components of the Zend Framework - Zend_Validate.
</p>
<blockquote>
Zend_Validate is a component of Zend Framework which provides validation classes which out-of-the-box enable you to check from string lengths to stranger properties like conformance to regular expressions or to a standard for barcodes. [...] Some parts of Zend_Validate are quite complex, and tie-in with the other components: there are file-related validations on size, hash and more to attach to your forms; in the domain-specific category instead, we can find validator for credit card numbers consistency, or barcodes; isbn codes; and more...
</blockquote>
<p>
He includes a code sample to show of just some of the validators the component includes like: alpha-numeric, "between", valid email address, valid IP address, matches a regular expression and, a very handy feature of the component, setting up chains of validations.
</p>]]></description>
      <pubDate>Fri, 03 Dec 2010 10:32:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Validating UK Postcodes]]></title>
      <guid>http://www.phpdeveloper.org/news/15433</guid>
      <link>http://www.phpdeveloper.org/news/15433</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has <a href="http://akrabat.com/zend-framework/validating-uk-postcodes/">shared a bit of code</a> he's put together to help with validating UK postal codes (since the functionality in Zend_Validate doesn't <a href="http://unicode.org/cldr/trac/ticket/2600">cooperate</a>), so he extended the main Zend_Validate_PostCode with his own validator.
</p>
<blockquote>
It's easy enough to add a filter to remove the space, but I'm a little worried that when (and if) it gets fixed, will the fixed version Zend_Validate_PostCode then fail to validate postcodes without the space? In theory it should as the space is part of the spec. I'd hate my code to unexpectedly break due to a valid bug fix. I can easy work around this worry though by simply creating my own extension of Zend_Validate_PostCode.
</blockquote>
<p>
The thirty-five line code example allows you to correctly validate the postal code with a quick call to the "isValid" method. He also links to <a href="https://github.com/gargoyle/PmcLib/blob/master/Postcode/Validate.php">another method</a> from <i>Paul Court</i> to handle things similarly.
</p>]]></description>
      <pubDate>Mon, 15 Nov 2010 12:29:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Zend_Filter_Input / Zend_Validate Messages]]></title>
      <guid>http://www.phpdeveloper.org/news/8661</guid>
      <link>http://www.phpdeveloper.org/news/8661</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has been working with the Zend_Filter component of the <a href="http://framework.zend.com">Zend Framework</a> and has discovered a few things:
</p>
<blockquote>
The basic usage of Zend_Filter_Input is [a simple call to Zend_Filter_Input with the filter types and data to filter]. The problem is that the message you get out isn't always written as you would like. Consider the output if the body record is empty. The text isn't exactly what I would want to display to a user. To change it you pass in a messages parameter to the $validators array.
</blockquote>
<p>
There's a long list of these "messages parameters" and <i>Rob</i> <a href="http://akrabat.com/2007/09/14/zend_filter_input-zend_validate-messages/">includes them in the post</a> - things like NOT_ALNUM, CHECKSUM, QUOTED_STRING, INVALID_DASH and UNDECIPHERABLE_TLD (37 of them in all).
</p>]]></description>
      <pubDate>Mon, 17 Sep 2007 08:48:00 -0500</pubDate>
    </item>
  </channel>
</rss>
