Advertisement
Underworld1337

Untitled

Dec 26th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1.     public static function validate_email($mail) {
  2.         if (strlen($mail) > 256) return false;
  3.         $pattern = '#^\S{1,64}@\S+\.\S{2,6}$#i';
  4.         return (bool) preg_match($pattern, $mail);
  5.     }
  6.  
  7.       if (self::validate_email($email) !== true) {
  8.         $this->action_out = "Fehler|Mail-Adresse scheint ungültig zu sein";
  9.         $s = false;
  10.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement