aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/PrintersController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/PrintersController.php')
-rw-r--r--h-source/Application/Controllers/PrintersController.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php
index d8cfe38..3e59702 100644
--- a/h-source/Application/Controllers/PrintersController.php
+++ b/h-source/Application/Controllers/PrintersController.php
@@ -43,11 +43,11 @@ class PrintersController extends GenericController
//hardware conditions
$this->m['HardwareModel']->strongConditions['update'] = array(
- "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> entry",
- "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
- "checkLength|99" => "model",
- "+checkLength|299" => "distribution",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|".Hardware::$regExpressions['model'] => "model|characters not allowed in the <i>model name</i> entry",
+ "+checkMatch|".Hardware::$regExpressions['vendorid_productid'] => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
"+checkIsStrings|".Printer::compatibilityList() => "compatibility",
"++checkIsStrings|".Printer::$commYear => "comm_year",
"+++checkIsStrings|".Printer::$interface => "interface",
@@ -58,12 +58,12 @@ class PrintersController extends GenericController
$this->m['HardwareModel']->strongConditions['insert'] = $this->m['HardwareModel']->strongConditions['update'];
$this->m['HardwareModel']->softConditions['update'] = array(
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
- "checkLength|20000" => "description",
- "+checkLength|49" => "driver",
- "++checkLength|49" => "kernel",
- "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
- "+++checkLength|1000" => "other_names|the <i>other names</i> entry exceeds the value of 1000 characters",
+ "checkMatch|".Hardware::$regExpressions['kernel'] => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "driver",
+ "++checkLength|49" => "kernel",
+ "++checkMatch|".Hardware::$regExpressions['driver'] => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ "+++checkLength|1000" => "other_names|the <i>other names</i> entry exceeds the value of 1000 characters",
);
$this->m['HardwareModel']->softConditions['insert'] = $this->m['HardwareModel']->softConditions['update'];