Code

Added check function for dns names
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Oct 2007 14:30:43 +0000 (14:30 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Oct 2007 14:30:43 +0000 (14:30 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7666 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc

index baf7f94683a34a30dacc5786328216c1e7d38996..2d258716d34f73edfabd48a70db1f58e361cd457 100644 (file)
@@ -955,6 +955,10 @@ function is_phone_nr($nr)
   return preg_match ("/^[\/0-9 ()+*-]+$/", $nr);
 }
 
+function is_dns_name($str)
+{
+  return(preg_match("/^[a-z0-9\.\-_\:]*$/i",$str));
+}
 
 function is_url($url)
 {