Howto see if form fields are identical in Zend framework [duplicate]
In Zend Framework (1.10) i want to check if two input fields are identical I have the following code in my form:
$this->addElement('password', 'password', array(
'label' => 'Wachtwoord:',
'required' => true
)
);
$this->addElement('password', 'verifypassword', array(
'label' => 'Bevestig wachtwoord:',
'required' => true,
)
);
开发者_如何学PythonI already tryed the "identical" validator, but I did'nt got it to work.
You can use a custom validation filter to accomplish this.
http://framework.zend.com/manual/en/zend.form.elements.html
The documentation outlines what you are describing, under Note: Validation Operates On Filtered Values with a class called My_Validate_PasswordConfirmation
精彩评论