Esempio n. 1
0
 protected function init()
 {
     $username = new Element('username');
     $username->filter('trim')->validate('notempty')->validate('match', '/\\w+(\\.\\w+)?/i')->validate('min', '3')->message('notempty', 'Please enter your username')->message('alnum', 'Invalid username')->message('min', 'Invalid username');
     $password = new Element('password');
     $password->filter('trim')->validate('notempty')->message('notempty', 'Please enter your password')->message('match', 'Invalid username');
     $this->addElements($username, $password);
 }
Esempio n. 2
0
 protected function init()
 {
     $forgot = new Element('email');
     $forgot->filter('trim')->validate('notempty')->validate('email')->message('notempty', 'Please enter your email')->message('email', 'Invalid email address');
     $this->addElement($forgot);
 }
Esempio n. 3
0
 private function confirm()
 {
     $password = new Element('confirm');
     $password->filter('trim')->validate('notempty')->validate('alnum')->message('notempty', 'Please confirm your password')->message('alnum', 'Only letters and numbers are allowed');
     $this->addelement($password);
 }
Esempio n. 4
0
 private function token()
 {
     $token = new Element('token');
     $token->filter('trim');
     $this->addElement($token);
 }