Ejemplo n.º 1
0
 public function initialize()
 {
     $email = new Text('email');
     $email->addValidator(new PresenceOf());
     $email->addValidator(new EmailValidator());
     $email->setAttribute('placeholder', '*****@*****.**');
     $email->setAttribute('class', 'col-xs-12');
     $email->setLabel($this->i18n->_('Email'));
     $this->add($email);
     $password = new Password('raw_password');
     $password->addValidator(new PresenceOf());
     $password->setLabel($this->i18n->_('Password'));
     $password->setAttribute('class', 'col-xs-12');
     $this->add($password);
     $rePassword = new Password('repassword');
     $rePassword->addValidator(new PresenceOf());
     $rePassword->setLabel($this->i18n->_('Re-type Password'));
     $rePassword->setAttribute('class', 'col-xs-12');
     $this->add($rePassword);
 }