[
https://issues.apache.org/jira/browse/WICKET-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530762
]
Johan Compagner commented on WICKET-1017:
-----------------------------------------
'hmm
it all starts with the minimum(0) method,we do say there:
/**
* Gets a Integer minimum validator to check if a integer value is
greater
* then the given minimum value.
*
*/
public static NumberValidator minimum(long minimum)
{
return new MinimumValidator(minimum);
}
but the check isn't
if (value <= minimum) fail
but
if (value < minimum) fail
now i am curious what people expect to happen.. is it including or not??
same goes for the maximum validator..
But do we change the maximum/minimum validators ?
Or what i also can do is add a param to the constructors of those with an
including flag..
By default it stays what it is now except for the Positive and Negative onces.
Or we can always just say in a wicket world the 0 is negative and positive!
> 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.