I don't get it. If you define the pattern to be dd/MM/yyyy, then you can't blame the validator to expect leading zeros conform to the pattern. Making the leads optional sounds more like "regex" to me. The only date validation within validator framework I can find is "isDate" that checks if the date is valid.
Mitesh K Patel
Joined: Nov 24, 2005
In my application user is also allowed to input date, and i do not want use to enter date in strict format.
And in struts validation framework, there are two variable available ,
if i use datePatternStrict, then only it should check for perfect date format with leading zero.
if i use datePattern, then it should allow date like, 1/11/2006, and should not give error message,
But still 'datePattern' is not working.
Is there any problem with version of struts jar file ?
Joined: Sep 06, 2005
by the way: the dependency date that you're using and the variable datePattern don't seem to be in sync. Maybe you should try changing depend=date to depend=datePattern