I’ve got three input fields:
NAME,
AGE,
COUNTRY
I want to check if NAME is anything. If NAME contains a value then the two other fields is required. If NAME is empty they can also skip AGE and COUNTRY.
Is this possible with jquery validate?
My current validation is based on a classname and then I’ve got the following in my js file:
beforeSubmit: function () {
return $('#ajaxform').validate().form();
}
you can use depends, like:
See: jquery Validate