Update form class and edit access table array
Form class has new check part for alpha numeric with spaces called "alphanumericspace". edit access table array gets update for making color no longer mandatory (almost never used). And adds alpha numeric with spaces and unique check for the name.
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
"value" => $GLOBALS["name"],
|
||||
"output_name" => $this->l->__("Access Group Name"),
|
||||
"mandatory" => 1,
|
||||
"type" => "text"
|
||||
"type" => "text",
|
||||
"error_check" => "alphanumericspace|unique"
|
||||
),
|
||||
"description" => array (
|
||||
"value" => $GLOBALS["description"],
|
||||
@@ -20,7 +21,7 @@
|
||||
"color" => array (
|
||||
"value" => $GLOBALS["color"],
|
||||
"output_name" => $this->l->__("Color"),
|
||||
"mandatory" => 1,
|
||||
"mandatory" => 0,
|
||||
"type" => "text",
|
||||
"size" => 6,
|
||||
"length" => 6,
|
||||
@@ -28,7 +29,6 @@
|
||||
"error_regex" => "/[\dA-Fa-f]{6}/",
|
||||
"error_example" => "F6A544"
|
||||
)
|
||||
|
||||
),
|
||||
"table_name" => "edit_access",
|
||||
"load_query" => "SELECT edit_access_id, name FROM edit_access ORDER BY name",
|
||||
|
||||
@@ -925,6 +925,11 @@
|
||||
if (!preg_match($this->table_array[$key]["error_regex"], $this->table_array[$key]["value"]))
|
||||
$this->msg .= sprintf($this->l->__("Please enter a valid (%s) input for the <b>%s</b> Field!<br>"), $this->table_array[$key]["error_example"], $this->table_array[$key]["output_name"]);
|
||||
break;
|
||||
case "alphanumericspace":
|
||||
//$this->debug('edit', 'IN Alphanumericspace');
|
||||
if (!preg_match("/^[0-9A-Za-z\ ]+$/", $this->table_array[$key]["value"]))
|
||||
$this->msg .= sprintf($this->l->__("Please enter a valid alphanumeric (Numbers and Letters, spaces allowed) value for the <b>%s</b> Field!<br>"), $this->table_array[$key]["output_name"]);
|
||||
break;
|
||||
case "alphanumeric":
|
||||
//$this->debug('edit', 'IN Alphanumeric');
|
||||
if (!preg_match("/^[0-9A-Za-z_\-]+$/", $this->table_array[$key]["value"]))
|
||||
@@ -932,7 +937,7 @@
|
||||
break;
|
||||
// this one also allows @ and .
|
||||
case "alphanumericextended":
|
||||
//$this->debug('edit', 'IN Alphanumeric');
|
||||
//$this->debug('edit', 'IN Alphanumericextended');
|
||||
if (!preg_match("/^[0-9A-Za-z_\-@\.]+$/", $this->table_array[$key]["value"]))
|
||||
$this->msg .= sprintf($this->l->__("Please enter a valid alphanumeric extended (Numbers, Letters, -, _, @ and . only, no spaces) value for the <b>%s</b> Field!<br>"), $this->table_array[$key]["output_name"]);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user