View Single Post
  #2 (permalink)  
Old 05-05-2008, 04:40 PM
wudz wudz is offline
Junior Member
 
Join Date: May 2008
Posts: 4
Default

you should use this:
array('Identical', $variable)

if you set 'test', the validator compares text from your input field with the 'test' word

if you have input field named 'test', you should write something like that:

array('Identical', $this->getRequest()->getParam('test'))

in other words:
Code:
//password entered in the form
$password = $this->getRequest()->getParam('password'); 

//repeat password field in your form
$form->addElement('password', 'repeat_password', 
        array(
                //...
                'validators'    => array(
                 //...
                    array('Identical', $password)
Reply With Quote