You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Don Brown (JIRA)" <ji...@apache.org> on 2006/04/25 20:48:46 UTC

[jira] Reopened: (STR-667) Validator Range Checking Bug

     [ http://issues.apache.org/struts/browse/STR-667?page=all ]
     
Don Brown reopened STR-667:
---------------------------

    Assign To:     (was: Struts Developer Mailing List)

> Validator Range Checking Bug
> ----------------------------
>
>          Key: STR-667
>          URL: http://issues.apache.org/struts/browse/STR-667
>      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:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org