Beispiel #1
0
 /**
  * Initializes the form element.
  */
 function init()
 {
     parent::init();
     // set label
     $this->setLabel('New password');
     // add validator for min and max string length
     $minLength = Daiquiri_Config::getInstance()->auth->passwordMinLength;
     $this->addValidator('StringLength', false, array($minLength, 256));
 }
Beispiel #2
0
 /**
  * Initializes the form element.
  */
 function init()
 {
     parent::init();
     // set label
     $this->setLabel('Confirm password');
     // add validataor for comparison with NewPassword element
     $newPassword = Zend_Controller_Front::getInstance()->getRequest()->getParam('new_password');
     $validator = new Zend_Validate_Identical($newPassword);
     $validator->setMessage("The passwords do not match.");
     $this->addValidator($validator);
 }
Beispiel #3
0
 /**
  * Initializes the form element.
  */
 function init()
 {
     parent::init();
     // set label
     $this->setLabel('Old password');
 }