From 3f6ce657da3ac6c133939bfcebb4e4e5f6bd2bc1 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Sun, 9 Mar 2014 21:02:27 +0100 Subject: [PATCH] Adds usage of new urlRegex field in client side validation --- core/src/main/resources/template/xhtml/form-close-validate.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/template/xhtml/form-close-validate.ftl b/core/src/main/resources/template/xhtml/form-close-validate.ftl index 81a17e1e1..f129156e5 100644 --- a/core/src/main/resources/template/xhtml/form-close-validate.ftl +++ b/core/src/main/resources/template/xhtml/form-close-validate.ftl @@ -120,7 +120,7 @@ END SNIPPET: supported-validators <#if validator.shortCircuit>continueValidation = false; } <#elseif validator.validatorType = "url"> - if (continueValidation && fieldValue != null && fieldValue.length > 0 && fieldValue.match("${validator.regex?js_string}")==null) { + if (continueValidation && fieldValue != null && fieldValue.length > 0 && fieldValue.match("/${validator.urlRegex?js_string}/i")==null) { addError(field, error); errors = true; <#if validator.shortCircuit>continueValidation = false;