mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
Adds usage of new urlRegex field in client side validation
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user