Thanks for your detailed reply, for the time being, I have decided to use the floatRange. doubleRange for our specific case was an overkill anyways.
The only reason I had to coup with double was that one perticular member of our development team insisted on using double instead of float for amount. Whereas, in reality there is no need for that, the capacity of float is lot more than the amount a user will ever be entering into our system anyways. It should've never been a double in the first place. Thanks for you time, and I really appreciate all the details you have provided. Regards, Muhammad Momin Rashid. "Matt Bathje" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Muhammad Momin Rashid wrote: > >> Hello, >> >> I've just migrated our application from strtus 1.1 to 1.2.4. >> >> I wanted to add a doubleRange check on one of the fields in my jsp. >> After much hassle I found out that doubleRange validation is not defined >> in the validation-rules file. Whereas, according to the documentation it >> is a standard built in validtion. >> >> Can anyone shed some light on this? >> >> Regards, >> Muhammad Momin Rashid. > > There are already 2 bugzilla reports regarding this. #20883 and 27089. > > The code you can use in your validator-rules until this gets fixed in a > struts version is: > > <validator name="doubleRange" > classname="org.apache.struts.validator.FieldChecks" > method="validateDoubleRange" > methodParams="java.lang.Object, > org.apache.commons.validator.ValidatorAction, > org.apache.commons.validator.Field, > org.apache.struts.action.ActionMessages, > javax.servlet.http.HttpServletRequest" > depends="double" > msg="errors.range" /> > > > This will not do javascript validation of the doublerange though. I > thought that this code: > <validator name="doubleRange" > classname="org.apache.struts.validator.FieldChecks" > method="validateDoubleRange" > methodParams="java.lang.Object, > org.apache.commons.validator.ValidatorAction, > org.apache.commons.validator.Field, > org.apache.struts.action.ActionMessages, > javax.servlet.http.HttpServletRequest" > depends="double" > msg="errors.range" > jsFunction="org.apache.commons.validator.javascript.validateFloatRange"/> > > would allow the doublerange, but it doesn't seem to be working for me. If > I figure it out I will let you know. > > > Matt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]