From b395551f50713f7851d94fe1939af56766a98608 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 25 Oct 2007 14:30:43 +0000 Subject: [PATCH] Added check function for dns names git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7666 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.30.2