bernd commited on 2008-03-11 11:04:36
Zeige 1 geänderte Dateien mit 6 Einfügungen und 1 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@984 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -124,7 +124,12 @@ function check_path( $input ) |
124 | 124 |
|
125 | 125 |
function check_emailaddr( $input ) |
126 | 126 |
{ |
127 |
- return (preg_match("/^[a-z]+[a-z0-9]*[\.|\-|_]?[a-z0-9]+@([a-z0-9]*[\.|\-]?[a-z0-9]+){1,4}\.[a-z]{2,4}$/i", $input ) == 1); |
|
127 |
+ return (bool) preg_match('/^[a-z0-9][a-z0-9%\[\]\.\-\_+]*@[a-z0-9\.\-]+\.[a-z]{2,4}/i', $input); |
|
128 |
+} |
|
129 |
+ |
|
130 |
+function check_domain( $input ) |
|
131 |
+{ |
|
132 |
+ return (bool) preg_match("/[a-z0-9\.\-]+\.[a-z]{2,4}$/i", $input ); |
|
128 | 133 |
} |
129 | 134 |
|
130 | 135 |
|
131 | 136 |