View Single Post
  #8 (permalink)  
Old 04-18-2008, 05:20 AM
scooch scooch is offline
Junior Member
 
Join Date: Apr 2008
Posts: 1
Default

Quote:
Originally Posted by kmg View Post
PHP Code:
$form->addElement('password''confirmPassword'
    array(
        
'required'    => true,
        
'label'        => 'Confirm Password',
        
'validators'    => array(
            array(
'StringLength'206),
            array(
'regex'false'/^[a-z0-9]/i'),
            array(
'CompareToField'false'password')
            )
        )
    ); 
Just to help anyone out who may be getting error messages when trying the above code snippet. Change the:

PHP Code:
array('CompareToField'false'password'
to
PHP Code:
array('CompareToField'false, array('password') ) 
It puzzled me for a bit, the 3rd parameter needs to be an array.
Reply With Quote