<?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: Improved Plugin for Model Validation: sfPropelValidatePlugin</title>
	<atom:link href="http://robrosenbaum.com/php/improved-plugin-for-model-validation-sfpropelvalidateplugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://robrosenbaum.com/php/improved-plugin-for-model-validation-sfpropelvalidateplugin/</link>
	<description>PHP, JavaScript, and Other Things</description>
	<lastBuildDate>Wed, 25 Feb 2009 11:43:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Lucas</title>
		<link>http://robrosenbaum.com/php/improved-plugin-for-model-validation-sfpropelvalidateplugin/comment-page-1/#comment-73</link>
		<dc:creator>Lucas</dc:creator>
		<pubDate>Fri, 19 Oct 2007 14:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://robrosenbaum.com/symfony/improved-plugin-for-model-validation-sfpropelvalidateplugin/#comment-73</guid>
		<description>Hi Nice plugin, i just made some modifications. 
Using: 
if (!$article-&gt;save()) {
  $this-&gt;forward(&#039;patient&#039;, &#039;edit&#039;);
}
sometimes does not returns true even if the validations succed, if you model has not been modified for ex, your post will always been forwarded. 

The solution i found was adding the following to sfValidateObjBuilder.php:

$updated = &#039;
    if(!$this-&gt;isModified()) return true;    
    &#039;;    
    $tmp = preg_replace(&#039;/(:save:pre.*?}.*?})/s&#039;, &#039;\1&#039;.$updated, $tmp, 1);

Cheers L</description>
		<content:encoded><![CDATA[<p>Hi Nice plugin, i just made some modifications.<br />
Using:<br />
if (!$article-&gt;save()) {<br />
  $this-&gt;forward(&#8216;patient&#8217;, &#8216;edit&#8217;);<br />
}<br />
sometimes does not returns true even if the validations succed, if you model has not been modified for ex, your post will always been forwarded. </p>
<p>The solution i found was adding the following to sfValidateObjBuilder.php:</p>
<p>$updated = &#8216;<br />
    if(!$this-&gt;isModified()) return true;<br />
    &#8216;;<br />
    $tmp = preg_replace(&#8216;/(:save:pre.*?}.*?})/s&#8217;, &#8216;\1&#8242;.$updated, $tmp, 1);</p>
<p>Cheers L</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rpsblog.com &#187; A week of symfony #37 (10-&#38;gt;16 September 2007)</title>
		<link>http://robrosenbaum.com/php/improved-plugin-for-model-validation-sfpropelvalidateplugin/comment-page-1/#comment-57</link>
		<dc:creator>rpsblog.com &#187; A week of symfony #37 (10-&#38;gt;16 September 2007)</dc:creator>
		<pubDate>Sun, 16 Sep 2007 22:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://robrosenbaum.com/symfony/improved-plugin-for-model-validation-sfpropelvalidateplugin/#comment-57</guid>
		<description>[...] Improved Plugin for Model Validation: sfPropelValidatePlugin [...]</description>
		<content:encoded><![CDATA[<p>[...] Improved Plugin for Model Validation: sfPropelValidatePlugin [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thierry Schellenbach</title>
		<link>http://robrosenbaum.com/php/improved-plugin-for-model-validation-sfpropelvalidateplugin/comment-page-1/#comment-51</link>
		<dc:creator>Thierry Schellenbach</dc:creator>
		<pubDate>Tue, 11 Sep 2007 11:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://robrosenbaum.com/symfony/improved-plugin-for-model-validation-sfpropelvalidateplugin/#comment-51</guid>
		<description>In fact I didn&#039;t look at builders yet. Could you post a tutorial?</description>
		<content:encoded><![CDATA[<p>In fact I didn&#8217;t look at builders yet. Could you post a tutorial?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

