Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Won't Fix
-
5.3.7
-
None
-
None
Description
Trying to validate a two decimal numeric input with"
<t:textfield t:id="erpfte" class="input-mini" value="quota.erp" translate="prop:twoDecimal" validate="regexp=^\d+(?:\.\d{1,2})?$" />
Generates this partial stack trace:
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)
Looking through the code, it appears the parser thinks the comma ends the current validator and is starting another.
Attachments
Issue Links
- duplicates
-
TAP5-520 Using regular expressions with the @Validate annotation causes odd parse errors if the regexp includes common characters (including commas)
-
- Closed
-