Ejemplo n.º 1
0
 public function isValid($data)
 {
     $passwordConfirmation = $this->getElement('passwordConfirmation');
     if (!empty($data['MP_Password'])) {
         $passwordConfirmation->setRequired(true)->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('error_message_password_isEmpty'))));
         $Identical = new Zend_Validate_Identical($data['MP_Password']);
         $Identical->setMessages(array('notSame' => $this->getView()->getCibleText('error_message_password_notSame')));
         $passwordConfirmation->addValidator($Identical);
     }
     return parent::isValid($data);
 }