You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org> on 2014/05/28 00:08:03 UTC
[jira] [Commented] (TAP5-2341) Can't specify a regexp validator
with a comma
[ https://issues.apache.org/jira/browse/TAP5-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14010379#comment-14010379 ]
Thiago H. de Paula Figueiredo commented on TAP5-2341:
-----------------------------------------------------
JIRA messed up the regexp.
{noformat}erpfte-regexp=^\d+(?:\.\d{1,2})?${noformat}
> Can't specify a regexp validator with a comma
> ---------------------------------------------
>
> Key: TAP5-2341
> URL: https://issues.apache.org/jira/browse/TAP5-2341
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3.7
> Reporter: Tony Nelson
> Priority: Blocker
>
> Trying to validate a two decimal numeric input with"
> {code}
> <t:textfield t:id="erpfte" class="input-mini" value="quota.erp"
> translate="prop:twoDecimal" validate="regexp=^\d+(?:\.\d{1,2})?$" />
> {code}
> Generates this partial stack trace:
> {code}
> Caused by: java.lang.RuntimeException: Unexpected character '2' at position 22 of input string: regexp=^\d+(?:\.\d{1,2})?$
> at org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.parseError(FieldValidatorSourceImpl.java:423)
> at org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.parse(FieldValidatorSourceImpl.java:315)
> at org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.toValidatorSpecifications(FieldValidatorSourceImpl.java:200)
> at org.apache.tapestry5.internal.services.FieldValidatorSourceImpl.createValidators(FieldValidatorSourceImpl.java:183)
> {code}
> Looking through the code, it appears the parser thinks the comma ends the current validator and is starting another.
--
This message was sent by Atlassian JIRA
(v6.2#6252)