my dog learned polymorphism*
The moose likes Struts and the fly likes Date Validation not ​validating 01/01/2ee​0 date in struts 1.2​ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Date Validation not ​validating 01/01/2ee​0 date in struts 1.2​" Watch "Date Validation not ​validating 01/01/2ee​0 date in struts 1.2​" New topic
Author

Date Validation not ​validating 01/01/2ee​0 date in struts 1.2​

ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Hi
I am trying to add date validation in validation.xml file, i have it setup as
below, it validates properly data entry like 0A/01/2012 or 01/A2/2012
but it makes date 01/01/2ee3 to be a valid date which is clearly not,

what am i missing


<constant>
<constant-name>dateFormat</constant-name>
<constant-value>MM/dd/yyyy</constant-value>
</constant>

<field property="expirationDate" depends="required,date">
<arg key="label.expirationDate"/>
<var><var-name>datePattern</var-name><var-value>${dateFormat}</var-value></var>
</field>





Ashish


A$HI$H
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date Validation not ​validating 01/01/2ee​0 date in struts 1.2​