|
|||
|
Hello,
I'm writing a register page and I need to verify wether the password in fieldA & fieldB are identical. Everything else with validators works smoothly. I just can't manage to get these to work. I can always take the easy way out and compare the 2 values outside of the form. But then there'd be 1 error message showing somewhere else except nexto the field where the error is. My form is in a PhPclass I call in my other page here's the password fields with their validators Code:
$wachtwoordA = new Zend_Form_Element_Password('wachtwoordA');
$wachtwoordA ->setLabel('Password')
->setRequired(true)
->addFilter('StringTrim')
->addValidator($LeegValidate,true)
->addValidator($lengthControl["8-20"]);
$wachtwoordB = new Zend_Form_Element_Password('wachtwoordB');
$wachtwoordB ->setLabel('Retype password')
->setRequired(true)
->addFilter('StringTrim')
->addValidator($LeegValidate,true)
->addValidator($lengthControl["8-20"])
->addValidator(new Artec_validators_PwValidator(array(
1 => $this->getValue("wachtwoordA"),
2 => $this->getValue('wachtwoordB'))
);
Atm I'm just echo'ing them to see if it sends through the right data Code:
public function isValid($value)
{
echo $value[1] . '<br>';
echo $value[2];
// echo $value['3'];
exit;
Code:
b c Can anybody help me solve this ? |
|
|||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|