[
https://issues.apache.org/jira/browse/WW-2444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukasz Lenart updated WW-2444:
------------------------------
Description:
validate date client-side no present.
add follow code in form-close-validate.ftl file
{code}
<#elseif validator.validatorType = "date">
var exp = /^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[1-2][0-9]\d{2})$/;
if (field.value != null && !field.value.match(exp)) {
addError(field, error);
errors = true;
}
{code}
more in http://fabiosantiago.com.br/blog/?p=17
was:
validate date client-side no present.
add follow code in form-close-validate.ftl file
<#elseif validator.validatorType = "date">
var exp = /^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[1-2][0-9]\d{2})$/;
if (field.value != null && !field.value.match(exp)) {
addError(field, error);
errors = true;
}
more in http://fabiosantiago.com.br/blog/?p=17
> Validation date
> ---------------
>
> Key: WW-2444
> URL: https://issues.apache.org/jira/browse/WW-2444
> Project: Struts 2
> Issue Type: New Feature
> Components: Core Actions
> Affects Versions: 2.0.11
> Environment: Windows XP, Struts 2.0.11, Java 1.5.
> Reporter: Fabio Santiago Torres Bandeira
> Priority: Trivial
> Fix For: 3.0
>
>
> validate date client-side no present.
> add follow code in form-close-validate.ftl file
> {code}
> <#elseif validator.validatorType = "date">
> var exp = /^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[1-2][0-9]\d{2})$/;
> if (field.value != null && !field.value.match(exp)) {
> addError(field, error);
> errors = true;
> }
> {code}
> more in http://fabiosantiago.com.br/blog/?p=17
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira