Uploaded image for project: '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)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0.18
    • 5.1.0.1
    • tapestry-core
    • 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 ^

      Attachments

        Issue Links

          Activity

            People

              igor.drobiazko Igor Drobiazko
              chaostya Kostiantyn Miklevskyi
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: