Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-860

JavaScript errors when adding validations to checkboxes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.4
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Tapestry doesn't support validations on checkboxes out of the box (after all, it's either on or off). Perhaps supporting the required validator would not be so bad.

      However, it is reasonable to add a validator on the client side, for example, to implement "if this is selected, this must be checked as well" scenarios.

      Anyway, because $F() of a checkbox return nulls, this line fails

      if (!t.validationError && ! value.blank())

      because value is null

      This is in Tapestry.FieldEventManager.validateInput

        Attachments

          Activity

            People

            • Assignee:
              hlship Howard M. Lewis Ship
              Reporter:
              hlship Howard M. Lewis Ship
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: