<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: CakePHP&#8217;s advanced model fields validation</title>
	<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/</link>
	<description>Specialty cuisines: app development, internet marketing and entrepreneurship</description>
	<pubDate>Thu, 28 Aug 2008 01:56:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>

	<item>
		<title>By: Jad</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-57</link>
		<author>Jad</author>
		<pubDate>Mon, 22 Oct 2007 16:59:15 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-57</guid>
		<description>@Kiger: hmm, you must have been tired when you worked on that because common, it's used in the method itself! ;) 

Reason why I didn't use it is exactly for the multiple validation rules. Getting used to cake, you start getting addicted to the fact that you never do the same thing twice and in that philosophy, the method is missing. 

I still believe this is a required enhancement and until then, I'll keep using ours.</description>
		<content:encoded><![CDATA[<p>@Kiger: hmm, you must have been tired when you worked on that because common, it&#8217;s used in the method itself! <img src='http://myeasyscripts.com/loudbaking/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Reason why I didn&#8217;t use it is exactly for the multiple validation rules. Getting used to cake, you start getting addicted to the fact that you never do the same thing twice and in that philosophy, the method is missing. </p>
<p>I still believe this is a required enhancement and until then, I&#8217;ll keep using ours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiger</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-56</link>
		<author>Kiger</author>
		<pubDate>Mon, 22 Oct 2007 16:46:19 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-56</guid>
		<description>Well, gwoo made me feel very silly today. Cake can inherently unbind rules by doing this:

unset($this-&#62;Model-&#62;validate['field']['rule']);

I feel like an idiot for not seeing this to begin with. Granted, you cannot unset various rules in an array like you can with our method, still, we should have seen this...</description>
		<content:encoded><![CDATA[<p>Well, gwoo made me feel very silly today. Cake can inherently unbind rules by doing this:</p>
<p>unset($this-&gt;Model-&gt;validate[&#8217;field&#8217;][&#8217;rule&#8217;]);</p>
<p>I feel like an idiot for not seeing this to begin with. Granted, you cannot unset various rules in an array like you can with our method, still, we should have seen this&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jad</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-39</link>
		<author>Jad</author>
		<pubDate>Mon, 08 Oct 2007 12:08:47 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-39</guid>
		<description>Andruu: Thanks for dropping by and glad it could help! :)</description>
		<content:encoded><![CDATA[<p>Andruu: Thanks for dropping by and glad it could help! <img src='http://myeasyscripts.com/loudbaking/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andruu</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-38</link>
		<author>Andruu</author>
		<pubDate>Mon, 08 Oct 2007 04:43:04 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-38</guid>
		<description>Thanks a lot, this article was just what I needed.</description>
		<content:encoded><![CDATA[<p>Thanks a lot, this article was just what I needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jad</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-35</link>
		<author>Jad</author>
		<pubDate>Sat, 06 Oct 2007 05:13:11 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-35</guid>
		<description>@Kiger: sorry haven't had time for the blog the past few days. I can see what you are saying here, however, without diving into the code right now, I believe you can make it save the field validation as an array and modify the method used to echo that in the input by making it loop that, no?</description>
		<content:encoded><![CDATA[<p>@Kiger: sorry haven&#8217;t had time for the blog the past few days. I can see what you are saying here, however, without diving into the code right now, I believe you can make it save the field validation as an array and modify the method used to echo that in the input by making it loop that, no?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiger</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-34</link>
		<author>Kiger</author>
		<pubDate>Thu, 04 Oct 2007 02:41:38 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-34</guid>
		<description>@Jad
Something just hit me. Remember this https://trac.cakephp.org/ticket/3297 where I suggested cake stop testing rules for a field once a rule for that field has failed? You had suggested a mixed param as the middle ground, which sounds great. But I just realized something else. There is more that would need to be done to fix this because of two things. 

In the current code, cake doesn't know which rule failed; it just knows that the field failed. So if you had 10 rules, and wanted the ones that filed displayed, cake cannot do that because it doesn't know what rule failed. It only knows that the field failed. The code would need to be modified so that an identifier for each failed rule was stored, so you would know which rules failed. Also, the ability to store a custom error message with each identifier would need to be created.</description>
		<content:encoded><![CDATA[<p>@Jad<br />
Something just hit me. Remember this <a href="https://trac.cakephp.org/ticket/3297" rel="nofollow">https://trac.cakephp.org/ticket/3297</a> where I suggested cake stop testing rules for a field once a rule for that field has failed? You had suggested a mixed param as the middle ground, which sounds great. But I just realized something else. There is more that would need to be done to fix this because of two things. </p>
<p>In the current code, cake doesn&#8217;t know which rule failed; it just knows that the field failed. So if you had 10 rules, and wanted the ones that filed displayed, cake cannot do that because it doesn&#8217;t know what rule failed. It only knows that the field failed. The code would need to be modified so that an identifier for each failed rule was stored, so you would know which rules failed. Also, the ability to store a custom error message with each identifier would need to be created.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loud Baking &#187; Blog Archive &#187; Validation combined with i18n in CakePHP</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-33</link>
		<author>Loud Baking &#187; Blog Archive &#187; Validation combined with i18n in CakePHP</author>
		<pubDate>Wed, 03 Oct 2007 21:06:21 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-33</guid>
		<description>[...] too long ago, I wrote a quite lengthy &#8216;how-to use validation in CakePHP&#8216; post. Over the past couple of days, I had to work with a form that uses 2 models and for [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] too long ago, I wrote a quite lengthy &#8216;how-to use validation in CakePHP&#8216; post. Over the past couple of days, I had to work with a form that uses 2 models and for [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jad</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-31</link>
		<author>Jad</author>
		<pubDate>Sun, 30 Sep 2007 05:48:09 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-31</guid>
		<description>Stupid code view add-on am using I guess.. It was there in the post on the admin side, go figure. Anyhow, I de-activated it on this post, so now all shows, just on black background.</description>
		<content:encoded><![CDATA[<p>Stupid code view add-on am using I guess.. It was there in the post on the admin side, go figure. Anyhow, I de-activated it on this post, so now all shows, just on black background.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiger</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-30</link>
		<author>Kiger</author>
		<pubDate>Sun, 30 Sep 2007 05:23:40 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-30</guid>
		<description>@Jad
It's probably not a big deal, but the second set of comments in the code got cut off in the updated post. The post ends up just saying " // where )"

If you are care to fix it, the paste-bin has the comments in their entirety.</description>
		<content:encoded><![CDATA[<p>@Jad<br />
It&#8217;s probably not a big deal, but the second set of comments in the code got cut off in the updated post. The post ends up just saying &#8221; // where )&#8221;</p>
<p>If you are care to fix it, the paste-bin has the comments in their entirety.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jad</title>
		<link>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-29</link>
		<author>Jad</author>
		<pubDate>Sun, 30 Sep 2007 04:44:48 +0000</pubDate>
		<guid>http://myeasyscripts.com/loudbaking/cakephps-advanced-model-fields-validation/#comment-29</guid>
		<description>I believe that's the best it could get. I have updated the post - thanks Kiger!</description>
		<content:encoded><![CDATA[<p>I believe that&#8217;s the best it could get. I have updated the post - thanks Kiger!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
