<?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 of optional fields with multiple validation rules</title>
	<atom:link href="http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:12:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-181975</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 25 Nov 2010 12:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-181975</guid>
		<description>@Hulsy: Good to hear you could fix your issue :)</description>
		<content:encoded><![CDATA[<p>@Hulsy: Good to hear you could fix your issue :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hulsy</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-181767</link>
		<dc:creator>Hulsy</dc:creator>
		<pubDate>Tue, 23 Nov 2010 10:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-181767</guid>
		<description>Thanks for the reply. I fixed it.
It was really stupid : I put quotes around true !!</description>
		<content:encoded><![CDATA[<p>Thanks for the reply. I fixed it.<br />
It was really stupid : I put quotes around true !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-181391</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 19 Nov 2010 16:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-181391</guid>
		<description>@Hulsy: Hm, without code it is difficult to say why it fails. I tested it with the following code, and it worked fine with CakePHP 1.3.6:
&lt;code&gt;
class Post extends AppModel {
    public $validate = array(&#039;title&#039; =&gt; array(&#039;rule&#039; =&gt; &#039;alphaNumeric&#039;, &#039;allowEmpty&#039; =&gt; true));
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@Hulsy: Hm, without code it is difficult to say why it fails. I tested it with the following code, and it worked fine with CakePHP 1.3.6:<br />
<pre><code>class Post extends AppModel {
    public $validate = array('title' =&gt; array('rule' =&gt; 'alphaNumeric', 'allowEmpty' =&gt; true));
}</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hulsy</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-181358</link>
		<dc:creator>Hulsy</dc:creator>
		<pubDate>Fri, 19 Nov 2010 10:35:43 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-181358</guid>
		<description>Hope you still read comments on old posts...
I have the same problem with only one rule (&#039;alphaNumeric&#039;) and &#039;allowEmpty&#039;. When the fields is left blank, the validation fails...
Any idea ?</description>
		<content:encoded><![CDATA[<p>Hope you still read comments on old posts&#8230;<br />
I have the same problem with only one rule (&#8216;alphaNumeric&#8217;) and &#8216;allowEmpty&#8217;. When the fields is left blank, the validation fails&#8230;<br />
Any idea ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-91300</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 26 May 2008 15:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-91300</guid>
		<description>@all: Thanks for your comments!

@Walker: Maybe it has changed in the meantime, at least here with 1.2.0.7043 it doesn&#039;t work with setting it on the field.

@nate: Hm, I don&#039;t see how this would enable complex conditional validations. 

@Tarique: If possible, I try to avoid regular expressions ;-)</description>
		<content:encoded><![CDATA[<p>@all: Thanks for your comments!</p>
<p>@Walker: Maybe it has changed in the meantime, at least here with 1.2.0.7043 it doesn&#8217;t work with setting it on the field.</p>
<p>@nate: Hm, I don&#8217;t see how this would enable complex conditional validations. </p>
<p>@Tarique: If possible, I try to avoid regular expressions ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dr. Hannibal Lecter</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-91242</link>
		<dc:creator>dr. Hannibal Lecter</dc:creator>
		<pubDate>Mon, 26 May 2008 09:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-91242</guid>
		<description>So that&#039;s why it didn&#039;t work for me.. :-)

Thanks for the tip!</description>
		<content:encoded><![CDATA[<p>So that&#8217;s why it didn&#8217;t work for me.. :-)</p>
<p>Thanks for the tip!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Butler</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-91093</link>
		<dc:creator>Peter Butler</dc:creator>
		<pubDate>Sun, 25 May 2008 15:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-91093</guid>
		<description>Many thanks, have had this problem mysel in the past and now know the most elegant of dealing with it in future builds</description>
		<content:encoded><![CDATA[<p>Many thanks, have had this problem mysel in the past and now know the most elegant of dealing with it in future builds</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tarique Sani</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-91020</link>
		<dc:creator>Tarique Sani</dc:creator>
		<pubDate>Sun, 25 May 2008 05:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-91020</guid>
		<description>Why bother - just use a regex :p</description>
		<content:encoded><![CDATA[<p>Why bother &#8211; just use a regex :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nate</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-90952</link>
		<dc:creator>nate</dc:creator>
		<pubDate>Sat, 24 May 2008 18:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-90952</guid>
		<description>The original validation system was designed around only one rule per field, and when we went to multiple, the break-down of options followed suit.  While not perfectly logical I could see this enabling certain complex conditional validations.</description>
		<content:encoded><![CDATA[<p>The original validation system was designed around only one rule per field, and when we went to multiple, the break-down of options followed suit.  While not perfectly logical I could see this enabling certain complex conditional validations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terr</title>
		<link>http://cakebaker.42dh.com/2008/05/24/validation-of-optional-fields-with-multiple-validation-rules/comment-page-1/#comment-90950</link>
		<dc:creator>Terr</dc:creator>
		<pubDate>Sat, 24 May 2008 17:51:49 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=606#comment-90950</guid>
		<description>Thanks for the heads-up, I&#039;m sure this would be a maddening problem I&#039;d run in some day.

I don&#039;t find it too illogical though. There has to be some sort of order in which the validation is done. From first to last rule sounds fine to me.</description>
		<content:encoded><![CDATA[<p>Thanks for the heads-up, I&#8217;m sure this would be a maddening problem I&#8217;d run in some day.</p>
<p>I don&#8217;t find it too illogical though. There has to be some sort of order in which the validation is done. From first to last rule sounds fine to me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

