Adds usage of new urlRegex field in client side validation

Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/3f6ce657
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/3f6ce657
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/3f6ce657

Branch: refs/heads/develop
Commit: 3f6ce657da3ac6c133939bfcebb4e4e5f6bd2bc1
Parents: 3457a65
Author: Lukasz Lenart <lukaszlen...@apache.org>
Authored: Sun Mar 9 21:02:27 2014 +0100
Committer: Lukasz Lenart <lukaszlen...@apache.org>
Committed: Sun Mar 9 21:02:27 2014 +0100

----------------------------------------------------------------------
 core/src/main/resources/template/xhtml/form-close-validate.ftl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/3f6ce657/core/src/main/resources/template/xhtml/form-close-validate.ftl
----------------------------------------------------------------------
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 81a17e1..f129156 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;</#if>
             }
             <#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;</#if>

Reply via email to