commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <>
Subject Re: Commons validator
Date Fri, 29 Aug 2008 13:14:41 GMT
On Fri, Aug 29, 2008 at 5:36 AM, Vinay Binny <> wrote:
> Hi all,
> I see a compareDates method in the DateValidator class of the routine
> package, I was wondering if I could use it directly in my
> validator-rules.xml by specifying something like:
> <validator name="compareDate"
> classname="org.apache.commons.validator.DateValidator"
> method="compareDates"
> but I had no luck figuring out how to di it.
> OR
> Should I be using these routine classes to develop a custom validation rule?

You need to develop a custom routine since that method (and other
similar ones) return an integer representing equal, less than and
greater than in the same style as the Comparator implementations:

So this could be used to develop validation rules for less than, less
than or equal, equal, greater than, greater than or equal


> Thanks,
> Vinay.

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

View raw message