From 9149ddd07bd7e173056e8690eb43c25d50dc5820 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 1 Oct 2010 11:20:06 +0000 Subject: [PATCH] Added syntax checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19884 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/goto/Config/class_TemplateWidget.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc index 899b587e0..0bbfd171a 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc @@ -108,6 +108,12 @@ class TemplateWidget */ function check() { + if($this->required && empty($this->value)){ + return(array(msgPool::required($this->display))); + } + if(!empty($this->value) && !empty($this->syntax) && !preg_match("/".$this->syntax."/", $this->value)){ + return(array(msgPool::invalid($this->display, $this->value, "/".$this->syntax."/"))); + } return(array()); } } -- 2.30.2