You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Raul Montes (JIRA)" <ji...@apache.org> on 2012/06/20 06:49:43 UTC

[jira] [Closed] (TAP5-1959) numericformat and max/minlength don't work well together

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

Raul Montes closed TAP5-1959.
-----------------------------

    Resolution: Invalid

Not valid because if the binding is an Integer, I should use max validator instead of maxLength validator.
                
> numericformat and max/minlength  don't work well together
> ---------------------------------------------------------
>
>                 Key: TAP5-1959
>                 URL: https://issues.apache.org/jira/browse/TAP5-1959
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Raul Montes
>            Priority: Minor
>
> Numericformat validator translate the initially String typed value of the field into an integer. This makes the next code of max/minlength fail:
> if (value.length > maxlength)
> because length attribute of the integer transformed by numericformat has always 0 as value. I don't know if numericformat shouldn't transform to int the String value or if maxlength should convert to String before counting characters (I think the latter though) but I cannot have an Integer binding with maxLength validator because Tapestry adds the numericformat automatically (I was checking there where only numbers using the regexp validator).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira