struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown (JIRA)" <>
Subject [jira] Closed: (STR-667) Validator Range Checking Bug
Date Tue, 25 Apr 2006 18:48:46 GMT
     [ ]
Don Brown closed STR-667:

    Resolution: Fixed

> Validator Range Checking Bug
> ----------------------------
>          Key: STR-667
>          URL:
>      Project: Struts Action 1
>         Type: Bug

>   Components: Action
>     Versions: 1.1 Beta 1
>  Environment: Operating System: other
> Platform: Other
>     Reporter: James Farley
>     Priority: Blocker
>      Fix For: 1.1 Family
>  Attachments: validator-rules.xml.diff
> 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).

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

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

View raw message