aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Models/HardwareModel.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-10-18 17:38:01 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-10-18 17:38:01 +0000
commitba62152bfdad584c231dc3e941cd1974dd5d881c (patch)
treefb7f137c846a4533d4f094f11c64e4499696937d /h-source/Application/Models/HardwareModel.php
parent7d294873ca1b9705652592523210f543e73ec1e1 (diff)
more characters are now allowed for the kernel entry
Diffstat (limited to 'h-source/Application/Models/HardwareModel.php')
-rw-r--r--h-source/Application/Models/HardwareModel.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php
index 9a40e4b..7978593 100644
--- a/h-source/Application/Models/HardwareModel.php
+++ b/h-source/Application/Models/HardwareModel.php
@@ -77,10 +77,10 @@ class HardwareModel extends Model_Map {
{
$this->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",
+ "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|".Wifi::$commYear => "comm_year",
"+++checkIsStrings|".$worksOptions => $worksField,
"++++checkIsStrings|".$interfaceOptions => "interface",
@@ -89,12 +89,12 @@ class HardwareModel extends Model_Map {
$this->strongConditions['insert'] = $this->strongConditions['update'];
$this->softConditions['update'] = array(
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
- "checkLength|20000" => "description",
- "+checkLength|49" => "kernel",
- "++checkLength|49" => "driver",
- "++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" => "kernel",
+ "++checkLength|49" => "driver",
+ "++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->softConditions['insert'] = $this->softConditions['update'];