コード例 #1
0
ファイル: Login.php プロジェクト: shenlu2011/Hub-master
 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);
 }
コード例 #2
0
ファイル: Forgot.php プロジェクト: shenlu2011/Hub-master
 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);
 }
コード例 #3
0
ファイル: Register.php プロジェクト: shenlu2011/Hub-master
 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);
 }
コード例 #4
0
ファイル: Reset.php プロジェクト: shenlu2011/Hub-master
 private function token()
 {
     $token = new Element('token');
     $token->filter('trim');
     $this->addElement($token);
 }