Tapestry 5
  1. Tapestry 5
  2. TAP5-520

Using regular expressions with the @Validate annotation causes odd parse errors if the regexp includes common characters (including commas)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.18
    • Fix Version/s: 5.1.0.1
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Try adding this field to your form:

      @Validate("regexp=^([a-zA-Z0-9]

      {2,4}

      )+$")
      private String somefield;

      Page will fail to render with exception saying:

      Render queue error in BeginRender[mypage.somefield]: Failure reading parameter 'validate' of component mypage.somefield: Coercion of ^([a-zA-Z0-9]{2 to type java.util.regex.Pattern (via String --> java.util.regex.Pattern) failed: Unclosed counted closure near index 15 ^([a-zA-Z0-9]{2 ^

        Issue Links

          Activity

          Konstantin Miklevskiy created issue -
          Konstantin Miklevskiy made changes -
          Field Original Value New Value
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Duplicate [ 3 ]
          Igor Drobiazko made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Duplicate [ 3 ]
          Assignee Igor Drobiazko [ igor.drobiazko ]
          Howard M. Lewis Ship made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          Summary Regexp validator parse error Using regular expressions with the @Validate annotation causes odd parse errors if the regexp includes common characters (including commas)
          Igor Drobiazko made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Fix Version/s 5.1.0.1 [ 12313660 ]
          Resolution Fixed [ 1 ]
          Thiago H. de Paula Figueiredo made changes -
          Link This issue is duplicated by TAP5-2341 [ TAP5-2341 ]

            People

            • Assignee:
              Igor Drobiazko
              Reporter:
              Konstantin Miklevskiy
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development