DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=35459>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35459 Summary: validateDate cannot handle exception Product: Struts Version: 1.2.7 Platform: All OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Validator Framework AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I make the defination in validation.xml as follows: <field property="Date" depends="date"> <arg0 key="date" resource="false" /> <var> <var-name>datePattern</var-name> <var-value>yyyy/MM/dd</var-value> </var> </field> While the value of property equals "2005/06/1t", it shows that this value is passed. I found in the source code of validateDate(...) that there's a function named GenericTypeValidator.formatDate. So I maked a test: ---------------------------------------------------------------- Date result = GenericTypeValidator.formatDate("2005/06/1t", "yyyy/MM/dd", false); System.out.println(result); ----------------------------------------------------------------- then I got the result: Wed Jun 01 00:00:00 CST 2005 There're no exceptions and the result is also valued, so validateDate(...) returns Boolean.TRUE. I think the problem is in GenericTypeValidator.formatDate(...). -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
