You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/06/24 21:37:49 UTC
DO NOT REPLY [Bug 10191] New: -
Validator Range Checking Bug
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10191
Validator Range Checking Bug
Summary: Validator Range Checking Bug
Product: Struts
Version: 1.1 Beta 1
Platform: Other
OS/Version: Other
Status: NEW
Severity: Blocker
Priority: Other
Component: Utilities
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: jfarley@studentadvantage.com
Currently, the struts validation framework allows you to validate based on any
number of "dependencies", among them: float, double, mask, range, etc. In my
validation.xml file I have a parameter that I am attempting to validate based
on three dependencies: required,mask,float,range. I would like a user to be
able to enter a dollar amount in the format "00.00" and have the value be in
the range "0" to "999999". Everything works perfectly *except* for the "range"
dependency, as this dependency assumes that the number that you are validating
against is an integer.
To me, this seems inappropriate. I should be able to validate any numerical
range, including floating point numbers. I looked through the source code and
it looks like two modifications would need to be made to change this: one to
the org.apache.struts.util.StrutsValidator.validateRange() method and one to
the org.apache.commons.validator.GenericValidator.isInRange() method. To me,
the methods should perform validation on the most generic case (a double).
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>