As above, how can I remove all of the required rules from a form using jQuery Validate?
This is what I have at present:
var settings = $('form').validate().settings;
//alert(settings.rules.toSource());
for (var i in settings.rules){
alert(i);
delete settings.rules.i;
// ^ not sure about how to do this properly,
// and how to just delete the 'required' rule and keep the rest intact
}
The function native to jQuery Validate returns an undefined error:
$("input, select, textarea").rules('remove','required');