addElement('email', 'email', array('label' => 'Enter your email address', 'required' => true)); $validatorRecordExists = new Zend_Validate_Db_RecordExists( Qs_Db::getTableName('User'), 'email', null, Qs_Db::getInstance() ); $validatorRecordExists->setMessage( 'There is no user with %value% email in our system', Zend_Validate_Db_RecordExists::ERROR_NO_RECORD_FOUND ); $this->getElement('email')->addValidator($validatorRecordExists); return $this; } protected function _initButtons() { if (!$this->_hasButtons) { return $this; } $this->addElement( 'submit', 'btnSubmit', array('label' => 'Reset Password', 'attribs' => array('class' => 'btn btn-primary')) ); return $this; } }