Questions related to what is reasonable to consider as a public interface to JQuery validate

Questions related to what is reasonable to consider as a public interface to JQuery validate

Normally I'd say "What is on the documentation page".  But:

I generally call validate() on my forms based on the existence of a class:

  1. $("form.validate").each(function(index) {
  2.     $(this).validate();
  3.     });

I'm finding that after the fact I would like to sometimes allow validation on some of the hidden fields in a form (yeah, I know).  If I knew in advance, I'd simply do:

  1. $('#formID').validate({
  2.     ignore: ':hidden:not("#fieldID")'
  3.   });

But I don't.  I also don't see a documented interface for changing what is ignored after validate() is called.  On the JQuery validate github area I see that in a similar situation jzaefferer recommended directly extending settings.rules:

  1. var rules = ajaxRulesReponse;
  2. $.each(rules, function(key, value) {
  3.  rules[key] = $.validator.normalizeRule(value);
  4. });
  5. $.extend( $(...).validate().settings.rules, rules );

Since JQuery validate plug-in "belongs to"  jzaefferer, I suspect that is a valid thing to do.   (As an aside, can anyone explain why calling .rules("add", ...) would not have worked in that case?)  This almost endorses settings.rules and normalizeRules as public interfaces...although I'm not sure that was the intent.

So my thought was to set or extend validate().settings.ignore to " :hidden:not('#fieldID') ", and sure enough that works.  But I don't like hacking into what should be private interfaces to plugins.   Can this be considered a public interface, at least in the same way that settings.rules is?  To me this means roughly that:

- There is no better interface for doing this
- It works (i.e. it does everything important that would have been done if I called validate() with the same information)
- There will some attempt to preserve this in future versions of JQuery validate

Is there any information on what the interfaces to JQuery validate 2.0 will look like, and when it will be released?

Thanks for any help.