From: hickert Date: Thu, 25 Oct 2007 14:30:43 +0000 (+0000) Subject: Added check function for dns names X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b395551f50713f7851d94fe1939af56766a98608;p=gosa.git Added check function for dns names git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7666 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index baf7f9468..2d258716d 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -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) {