Code

Added + to mail addresses. Closes #1076
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 07:18:05 +0000 (07:18 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 07:18:05 +0000 (07:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19986 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/utils/class_tests.inc

index 61d0ecfa826908bc40968531df892506145f96ad..602ce0623bf7666230bab6df4c52e62e7723e0a3 100644 (file)
@@ -205,10 +205,10 @@ class tests {
       return (TRUE);
     }
     if ($template){
-      return preg_match ("/^[._a-z0-9%-]+@[_a-z0-9-]+(\.[a-z0-9-]+)(\.[a-z0-9-]+)*$/i",
+      return preg_match ("/^[._a-z0-9%\+-]+@[_a-z0-9-]+(\.[a-z0-9-]+)(\.[a-z0-9-]+)*$/i",
           $address);
     } else {
-      return preg_match ("/^[._a-z0-9-]+@[_a-z0-9-]+(\.[a-z0-9i-]+)(\.[a-z0-9-]+)*$/i",
+      return preg_match ("/^[._a-z0-9\+-]+@[_a-z0-9-]+(\.[a-z0-9i-]+)(\.[a-z0-9-]+)*$/i",
           $address);
     }
   }