On Fri, Aug 29, 2008 at 5:36 AM, Vinay Binny <[EMAIL PROTECTED]> 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: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Comparator.html So this could be used to develop validation rules for less than, less than or equal, equal, greater than, greater than or equal Niall > Thanks, > > Vinay. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
