struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Taylor <>
Subject datePatternStrict for MM/dd/yyyy seems to allow 04/04/200w
Date Tue, 10 May 2005 09:34:24 GMT
Greetings, I'm using Struts 1.2.7 and trying to validate a date field 
using the datePatternStrict with a date format of MM/dd/yyyy. Everything 
seems to work as expected until I enter a date like 04/04/200w. It seems 
that the date validation routine thinks that this is a valid date...or 
atleast it allows validation of the date field to pass. The docs say 
that date validation leverages SimpleDateFormat so I looked at the 
javadocs, but found nothing to indicate that parsing "04/04/200w" should 
pass (although I haven't tested it explicitely with just SimpleDateFormat).

I'm using the following snippet in my validation.xml file:

BTW, the javascript for date validation seems to catch this, but the 
server side validation does not.

I must be doing something wrong or this must be a known issue.

Any ideas?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message