You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Raul Montes (JIRA)" <ji...@apache.org> on 2012/06/20 06:47:43 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13397264#comment-13397264 ]
Raul Montes commented on TAP5-1959:
-----------------------------------
I'm sorry, thinking a little more about this, I suppose I should use max validator instead of maxlength validator and put a max value of 999[…]9999. I'm closing this issue because of this.
> 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