You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/09/14 19:05:00 UTC
[jira] [Closed] (WW-2444) Validation date
[ https://issues.apache.org/jira/browse/WW-2444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart closed WW-2444.
-----------------------------
Resolution: Fixed
> 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: 6.1.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 was sent by Atlassian Jira
(v8.20.10#820010)