setAttrib('class', 'clmnlist'); $form->addElement('text', 'firstName', array('label' => 'First Name', 'required' => true)); $form->addElement('text', 'lastName', array('label' => 'Last Name', 'required' => true)); $form->addElement('text', 'login', array('label' => 'Login', 'required' => true)); $loginValidator = new Qs_Validate_Unique($this->dataObj->table, 'login', $this->dataObj->getPrimaryKey()); $loginValidator->setMessage('Login must be unique', 'notUnique'); $form->login->addValidator($loginValidator); $form->addElement('text', 'email', array('label' => 'Email', 'required' => true)); $form->email->addValidator('EmailAddress'); $emailValidator = new Qs_Validate_Unique($this->dataObj->table, 'email', $this->dataObj->getPrimaryKey()); $emailValidator->setMessage('Email must be unique', Qs_Validate_Unique::NOT_UNIQUE); $form->email->addValidator($emailValidator); $form->addElement('password', 'password', array('label' => 'Password', 'autocomplete' => 'off')); $form->addElement('password', 'confirmPassword', array('label' => 'Confirm Password', 'autocomplete' => 'off')); $form->password->addValidator('ConfirmPassword', false, array('confirmPassword')); } }