<?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>Tue, 21 May 2013 07:42:17 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jonathan Snook's Blog: CakePHP: Data Validation]]></title>
      <guid>http://www.phpdeveloper.org/news/5627</guid>
      <link>http://www.phpdeveloper.org/news/5627</link>
      <description><![CDATA[<p>
<i>Jonathan Snook</i> continues his look at the CakePHP framework today with <a href="http://www.snook.ca/archives/php/cakephp_data_va_1/">this new post</a> on his blog, specifically looking at data validation methods.
</p>
<blockquote>
Validation is one of the basic and most tedious tasks in application development. If there was ever a reason to use a framework this would be it. There are two ways that appear to be advocated by the CakePHP site and while both have benefits, I'm using a slightly different approach.
</blockquote>
<p>
The "two ways" <a href="http://www.snook.ca/archives/php/cakephp_data_va_1/">he mentions</a> are auto-validation and using the validates() function (different from the suggestion in the CakePHP wiki of overriding the beforeSave() function). The first is built-in functionality, and is simpler to use. It allows you to define custom profiles for your values, ensuring they match the requirements. Using the validates() function is actually overriding a standard function and can be used to do more custom validation on the values passed back in.
</p>]]></description>
      <pubDate>Tue, 20 Jun 2006 05:42:38 -0500</pubDate>
    </item>
  </channel>
</rss>
