I use Zend Framework, and I have a form with only two elements: email, and password.
I would like to have two password elements, in doing so the user has to type the password twice. The code should check whether the user typed the exact same password in each password element. Just as a double check. The code below will create a form with the two elements. But without the double check.
$form = new Zend_Form();
$form->setAction('?action=certificateSettings');
$form->setView($this->view);
$email= $form->createElement('text', 'licenceEmail')
->setLabel('Admin email')
->setValue($licenceParams['email'])
$pass = $form->createElement('text', 'licencePass')
->setLabel('Admin password')
->setValue($licenceParams['password'])
->setRequired();
$form->addElement($email)
->addElement($pass);
How can I implement this password double check? Where should this double check be validated?