Browse code

ext/filter benutzen für email-filterung

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@995 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on19/03/2008 14:49:13
Showing1 changed files
... ...
@@ -124,13 +124,10 @@ function check_path( $input )
124 124
 
125 125
 function check_emailaddr( $input )
126 126
 {
127
-  return (bool) preg_match('/^[a-z0-9][a-z0-9%\[\]\.\-\_+]*@[a-z0-9\.\-]+\.[a-z]{2,4}/i', $input);
127
+  return (bool) filter_var($input, FILTER_VALIDATE_EMAIL) == $input);
128 128
 }
129 129
 
130 130
 function check_domain( $input )
131 131
 {
132 132
   return (bool) preg_match("/[a-z0-9\.\-]+\.[a-z]{2,4}$/i", $input );
133 133
 }
134
-
135
-
136
-?>