[ 
https://issues.apache.org/jira/browse/VALIDATOR-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb resolved VALIDATOR-238.
----------------------------
    Resolution: Abandoned

> Add scales (not the reptile kind) to double/float validations
> -------------------------------------------------------------
>
>                 Key: VALIDATOR-238
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-238
>             Project: Commons Validator
>          Issue Type: Improvement
>    Affects Versions: 1.3.1 Release
>            Reporter: Paul Benedict
>            Priority: Major
>
> I have a DECIMAL(10, 8) column that I am trying to capture as user input.  
> This is very hard to represent with the validator because the length of the 
> scale is very large. I am currently using a maxlength=8,min=0,max=99999999 
> but it is not exact.
> I propose retrofitting double/float validations that may include length of 
> the scale. For another example, with a scale of two, a user may enter 2, 2.5, 
> 2.55 but not 2.555. This will allow me to remove any inexact usage of 
> maxlength.
> <field property="latitude" depends="double,doubleRange">
>   <var>
>     <var-name>scale</var-name>
>     <var-value>8</var-value>
>   </var>
>   <var>
>     <var-name>min</var-name>
>     <var-value>-90</var-value>
>   </var>
>   <var>
>     <var-name>max</var-name>
>     <var-value>90</var-value>
>   </var>
> </field>



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to