From 4baf17880e3c83b6900794459d2ebb9adf379aa3 Mon Sep 17 00:00:00 2001 From: "haertl.mike" <> Date: Wed, 29 Oct 2008 19:47:02 +0000 Subject: Fixed issue #13 (trac #813) --- framework/Web/Javascripts/source/prado/validator/validation3.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/Web/Javascripts/source') diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js index d94a6c0c..a3b803d8 100644 --- a/framework/Web/Javascripts/source/prado/validator/validation3.js +++ b/framework/Web/Javascripts/source/prado/validator/validation3.js @@ -1668,6 +1668,7 @@ Prado.WebUI.TRegularExpressionValidator = Class.extend(Prado.WebUI.TBaseValidato * @constructor initialize * @param {object} options - Additional constructor option: * @... {string} ValidationExpression - Regular expression to match against. + * @... {string} PatternModifiers - Pattern modifiers: combinations of g, i, and m */ /** @@ -1678,12 +1679,12 @@ Prado.WebUI.TRegularExpressionValidator = Class.extend(Prado.WebUI.TBaseValidato evaluateIsValid : function() { var value = this.getValidationValue(); - if (value.length <= 0) + if (value.length <= 0) return true; - var rx = new RegExp(this.options.ValidationExpression); - var matches = rx.exec(value); - return (matches != null && value == matches[0]); + var rx = new RegExp(this.options.ValidationExpression,this.options.PatternModifiers); + var matches = rx.exec(value); + return (matches != null && value == matches[0]); } }); -- cgit v1.2.3