What's the rationale behind the validate plugin only handling one
jQuery object?  This doesn't seem consistent with how jQuery works at
all.

The website states:
Validating multiple forms on one page: The plugin can handle only one
form per call. In case you have multiple forms on a single page which
you want to validate, you can avoid having to duplicate the plugin
settings by modifying the defaults via $.validator.defaults. Use
$.validator.setDefaults({...}) to override multiple settings at once.

But I have a serious problem with this...  first off, I don't want to
validate every form on my page.  I have a number of widgets that
utilize forms that don't need validation on the client side.  What I
would love is to be able to do something like:

$('form.classOfForms').validate({....});

And have my validation apply simultaneously to all of the forms with
that class, just like most other jQuery plugins would do, as well as
the core.  Why wouldn't validate() work like submit()?

For now I'm doing this...

$('form.classOfForms').each(function() {
    $(this).validate({....});
});

But as I said... this seems unnecessary, and it doesn't strike me as
the jQuery way.

Any idea why this is done the way it is, or if this can be fixed to
behave more jQuery esk?

Thanks,
- Stan Lemon

Reply via email to