posted 18 years ago
You need to write a custom validator in which you can fetch the values of the two date fields and validate them and then
throw the error messages accordingly. There are two error conditions - the two dates might be equal or end date is earlier begin date.
If you are using Struts1.1, you might need to change the method
signature of the validator to ActionErrors in place of ActionMessages. The following code would help you:
validation-rules.xml:
validation.xml:
test.DateRangeValidator.java:
MessageResources.properties
Hope this helps.
Thanks,<br />Durgaprasad<br />SCJP1.4, SCWCD1.4, SCBCD1.3,<br />SCEA