Fix bug in regex check in form generate

This commit is contained in:
Clemens Schwaighofer
2016-01-07 12:40:05 +09:00
parent a182834985
commit 86cd04f862

View File

@@ -927,13 +927,14 @@
break;
case "alphanumeric":
//$this->debug('edit', 'IN Alphanumeric');
if (!preg_match("/^[0-9A-Za-z_-]+$/", $this->table_array[$key]["value"]))
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 only also - and _, no spaces) value for the <b>%s</b> Field!<br>"), $this->table_array[$key]["output_name"]);
break;
// this one also allows @ and .
case "alphanumericextended":
//$this->debug('edit', 'IN Alphanumeric');
if (!preg_match("/^[0-9A-Za-z_-@\.]+$/", $this->table_array[$key]["value"]))
$this->debug('REGEX CHECK', 'ANE: '.$this->table_array[$key]["value"]);
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;
case "password":