[ 
https://issues.apache.org/jira/browse/WICKET-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530775
 ] 

Sebastiaan van Erk commented on WICKET-1017:
--------------------------------------------

The minimum validator is correct. If the value is STRICTLY LESS than the 
minimum, you should fail, and only then. It seems to me the javadoc is wrong 
there. It should read something like "check if an integer value is at least the 
given minimum value".

As far as POSITIVE being a minimum(0) validator, that seems incorrect to me. 
And I'd prefer it if the Wicket world didn't have it's own version of 
mathematics. ;-)

The "inclusive" flag seems useful to me, but then the naming is a bit 
unintuitive in my opinion.



> POSITIVE and NEGATIVE in NumberValidator are badly named (or contain a bug)
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-1017
>                 URL: https://issues.apache.org/jira/browse/WICKET-1017
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Sebastiaan van Erk
>            Priority: Minor
>
> The POSITIVE validator is a new number validator with minimum 0.
> However 0 is not positive. Therefore, the validator should be called 
> NONNEGATIVE. That or it should not allow 0.
> The validation messages (at least in Dutch) state that the number must be 
> LARGER than 0 if I enter a negative number.
> However, 0 is of course accepted.
> Thus, for consistency I think it would probably be best to fix this one way 
> or the other.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to