/** * Create form elements. */ public function init() { parent::init(); $this->getElement('username')->addValidator(new Application_Form_Validate_LoginAvailable(array('ignoreCase' => $this->_mode === 'edit'))); // add password validator $confirmPassword = $this->getElement('confirmPassword'); $passwordValidator = new Application_Form_Validate_Password(); $confirmPassword->addValidator($passwordValidator); // add form elements for selecting roles $this->_addRolesGroup(); }
/** * Initializes form and adds display group for roles. */ public function init() { parent::init(); $this->_addRolesGroup(); }