Created
August 27, 2012 16:46
-
-
Save jeremykendall/3490249 to your computer and use it in GitHub Desktop.
First Zend_Validate_Db_NoRecordExists validator is ignored
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->addElement('text', 'email', array( | |
'label' => 'Your email address', | |
'required' => true, | |
'validators' => array( | |
array('EmailAddress'), | |
array( | |
new \Zend_Validate_Db_NoRecordExists(array('table' => 'accounts', 'field' => 'email')), | |
'breakChainOnFailure' => true | |
), | |
array(new \Zend_Validate_Db_NoRecordExists(array('table' => 'beta_invites', 'field' => 'email'))) | |
) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The fix is to use a Zend_Validate() validator chain. See http://framework.zend.com/issues/browse/ZF-6904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel.