{"id":112,"date":"2008-08-13T16:17:53","date_gmt":"2008-08-14T00:17:53","guid":{"rendered":"http:\/\/www.codebelay.com\/blog\/?p=112"},"modified":"2008-08-13T16:21:14","modified_gmt":"2008-08-14T00:21:14","slug":"sfvalidatorcompare-is-now-sfvalidatorschemacompare","status":"publish","type":"post","link":"https:\/\/www.codebelay.com\/blog\/2008\/08\/13\/sfvalidatorcompare-is-now-sfvalidatorschemacompare\/","title":{"rendered":"sfValidatorCompare Is Now sfValidatorSchemaCompare"},"content":{"rendered":"<p>I&#8217;ve been running into other folks that have been having trouble with symfony 1.1 on Twitter. One common stumbling block is sfValidatorSchemaCompare.<\/p>\n<p>I&#8217;m just gonna paste code here, because I&#8217;m now a week behind schedule working with symfony 1.1 because I didn&#8217;t pad time for having to read a good chunk of the source of symfony 1.1:<\/p>\n<pre>\r\n&lt;?php\r\n\r\n    $this->validatorSchema->setPostValidator(new sfValidatorAnd(array(\r\n\t  new sfValidatorSchemaCompare('email', '==', 'email_confirm',\r\n\t\t    array(),\r\n\t\t    array('invalid' => 'The email adresses must match')\r\n\t\t  ),\r\n\t  new sfValidatorSchemaCompare('password', '==', 'password_confirm',\r\n\t\t    array(),\r\n\t\t    array('invalid' => 'The passwords must match')\r\n\t\t  ),\r\n\t    )));\r\n\r\n?&gt;\r\n<\/pre>\n<p>Anyway it&#8217;s been cool getting props for posting code like the above. \ud83d\ude00<\/p>\n<p>Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been running into other folks that have been having trouble with symfony 1.1 on Twitter. One common stumbling block is sfValidatorSchemaCompare. I&#8217;m just gonna paste code here, because I&#8217;m now a week behind schedule working with symfony 1.1 because I didn&#8217;t pad time for having to read a good chunk of the source of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56,33],"tags":[391,109],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-php","category-webapps","tag-php","tag-symfony-11"],"_links":{"self":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":0,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebelay.com\/blog\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}