I\'m using the jQuery Validation Plugin on my form. On my form I have a \'Telephone\' field and a \'Mobile No.\' field.
How would I go about making it so the user ha
Came here looking for the same answers. Found the above post very helpful. Thanks.
I have extended this solution to check if the other field is in fact valid, rather than just "not empty". This ensures that the user inputs a valid Phone Number before removing the "required" class from the Mobile field and vice versa.
Mobile: {
required: function(element) {
return (!$("#Phone").hasClass('valid'));
}
},
Phone: {
required: function(element) {
return (!$("#Mobile").hasClass('valid'));
}
}