NumberValidator.POSITIVE gives an intimidating error message
------------------------------------------------------------
Key: WICKET-1336
URL: https://issues.apache.org/jira/browse/WICKET-1336
Project: Wicket
Issue Type: Improvement
Components: wicket
Affects Versions: 1.3.1
Reporter: Daniel Kaplan
Priority: Minor
Here's the code I was using for my TextField:
form.add(new TextField("input_text", new PropertyModel(this, "inputText"),
Integer.class)
.add(NumberValidator.POSITIVE)
.setRequired(true));
If you type "-1" on the form, it gives you this error message:
'-1' is smaller than the minimum of 4.9E-324.
The work around to this is to use NumberValidator.minimum(0) instead. That, as
far as I can tell, works the same way but gives this error message:
'-1' is smaller than the minimum of 0.
I think the user would prefer to see that.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.