Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5337

Assert that IFormValidator instance is added to the form

    XMLWordPrintableJSON

    Details

      Description

      This enhancement is related to this (my) invalid bug https://issues.apache.org/jira/browse/WICKET-5336

      Documentation for IFormValidator states:

      "... These validators are added to the form..."

      It would be fine if there is check in FormComponent (add(final IValidator<? super T> validator) method), that IValidator is NOT IFormValidator, something like

      Args.isFalse(validator instance IFormValidator, "validator");

      Another place where check should be added is overriden bind(Component component) method of AbstractFormValidator

      public void bind(Component component)

      { Args.isTrue(component instance Form, "validator"); }

        Attachments

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              betlista Betlista
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: