Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
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"); }