From 86cd04f862b32e9e9e880c5325848c0c32f03ed9 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Thu, 7 Jan 2016 12:40:05 +0900 Subject: [PATCH] Fix bug in regex check in form generate --- www/libs/Class.Form.Generate.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/libs/Class.Form.Generate.inc b/www/libs/Class.Form.Generate.inc index ec134200..f61fd5fb 100644 --- a/www/libs/Class.Form.Generate.inc +++ b/www/libs/Class.Form.Generate.inc @@ -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 %s Field!
"), $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 %s Field!
"), $this->table_array[$key]["output_name"]); break; case "password":