You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Daniel Kaplan (JIRA)" <ji...@apache.org> on 2008/02/11 03:06:08 UTC

[jira] Created: (WICKET-1336) NumberValidator.POSITIVE gives an intimidating error message

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.


[jira] Assigned: (WICKET-1336) NumberValidator.POSITIVE gives an intimidating error message

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-1336:
-------------------------------------

    Assignee: Johan Compagner

> 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
>            Assignee: Johan Compagner
>            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.


[jira] Closed: (WICKET-1336) NumberValidator.POSITIVE gives an intimidating error message

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner closed WICKET-1336.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.2

i changed it so that now the resource key are:

NumberValidator.positive='${input}' must be positive.
NumberValidator.negative='${input}' must be negative.

so the text  different now. I only updated english and dutch so the rest has to come when time passes


> 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
>            Assignee: Johan Compagner
>            Priority: Minor
>             Fix For: 1.3.2
>
>
> 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.