You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Tony Nelson (JIRA)" <ji...@apache.org> on 2014/05/27 22:47:03 UTC

[jira] [Created] (TAP5-2341) Can't specify a regexp validator with a comma

Tony Nelson created TAP5-2341:
---------------------------------

             Summary: 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)