diff options
Diffstat (limited to 'includes/sys_page.php')
-rw-r--r-- | includes/sys_page.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/sys_page.php b/includes/sys_page.php index 54bbd953..c423155f 100644 --- a/includes/sys_page.php +++ b/includes/sys_page.php @@ -40,6 +40,13 @@ function strip_item($item) { } /** + * Überprüft eine E-Mail-Adresse. + */ +function check_email($email) { + return (bool) preg_match("#^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([\p{L}0-9])+(([\-])+([\p{L}0-9])+)*\.)+([\p{L}])+(([\-])+([\p{L}0-9])+)*))$#u", $email); +} + +/** * Gibt zwischengespeicherte Fehlermeldungen zurück und löscht den Zwischenspeicher */ function msg() { |