/** * 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)); }
/** * 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); }
/** * Initializes the form element. */ function init() { parent::init(); // set label $this->setLabel('Old password'); }