From: cajus Date: Mon, 16 Nov 2009 10:15:49 +0000 (+0000) Subject: More precise domain test - take one X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f82fe8b73053177535e81181e478d94313410605;p=gosa.git More precise domain test - take one git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14818 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/utils/class_tests.inc b/gosa-core/include/utils/class_tests.inc index 343163dd1..4c6c60f65 100644 --- a/gosa-core/include/utils/class_tests.inc +++ b/gosa-core/include/utils/class_tests.inc @@ -127,7 +127,7 @@ class tests { /* Simple is domain check, it checks if the given string looks like "string(...).string" */ public static function is_domain($str) { - return(preg_match("/^([a-z0-9\-]*)\.[a-z0-9\-]*$/i",$str)); + return(preg_match("/^(([a-z0-9\-]{2,63})\.)*[a-z]{2,63}$/i",$str)); }