Then in the form, I would provide methods that allow you to get the converted values.
(In the form, you will need to convert the entered String value into either using the dashes or slashes).
For item 2, in the ActionForm.validate() method I'd implement the date ordering rule. There may be more clever ways ... YMMV.
-Bill Siggelkow
Milind Rao wrote:
I'm using the Validator framework to validate dates and I have two questions
1. I'd like the user to be able to enter a date using different delimiters like '/' or '-'. So both MM-dd-yyyyy and MM/dd/yyyy should be allowed. Is there a way to do that? Currently I'm using the built-in date validation and specifiying a date pattern which can only be one of the above.
2. I have a start date and an end date text fields. I want to
validate that the end date is later than or equal to the start date. Looks like I have to create my own validation class. Which is not a
big deal. But I don't want to re-invent the wheel. So if this is
already available somewhere, I'd appreciate a pointer in the right
direction.
Thanks.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]