Hi,
i'd like to implement a 3-Field-Validator. This means if one optional field
in a form is set, two other fields become mandatory as well.
What's the best way to implement this?
My first thought was to use it IValidator, but this accepts just values of one
field - as far as i've understood
My
You can implement an IFormValidator. Alternatively you use a custom
IValidator which checks the current value of the optional field:
public class OptionalValidatorT implements IValidatorT
{
private FormComponent? optional;
private IValidatorT validator;
public
Hi André,
You can add this validator to the form
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.markup.html.form.validation.AbstractFormValidator;
import org.apache.wicket.util.string.Strings;
import