Code

Updated table summary
[gosa.git] / gosa-plugins / fai / admin / fai / class_faiVariableEntry.inc
index 5ee011c4481d218708c9d8186b8d39bee13eafe8..dd88739559bbda247393bf731682347c82ecd506 100644 (file)
@@ -93,10 +93,14 @@ class faiVariableEntry extends plugin
     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);
   }