Code

Updated table summary
[gosa.git] / gosa-plugins / fai / admin / fai / class_faiVariableEntry.inc
index a60d10e220307b74d09ca010c786bee93b80d7e1..dd88739559bbda247393bf731682347c82ecd506 100644 (file)
@@ -90,13 +90,17 @@ class faiVariableEntry extends plugin
       $message[] = msgPool::duplicated(_("Name"));
     }
     
-    if(empty($this->FAIvariableContent)) {
+    if($this->FAIvariableContent == "") {
       $message[]= msgPool::required(_("Content")); 
     }
-   
-    if(empty($this->cn)){
+  
+    $c = trim($this->cn);
+    if($c == ""){
       $message[] = msgPool::required(_("Name"));
     }
+    if(preg_match("/[^a-z0-9_\-]/i",$c)){
+      $message[] = msgPool::invalid(_("Name"),$c,"/[a-z0-9_\-]/i");
+    }
 
     return ($message);
   }