jquery validate breaks when supplying additional metadata

jquery validate breaks when supplying additional metadata

Hi,

I am working on a web form which uses jquery validatate for validation and a (custom-built) plugin for ajax support. My plugin supports metadata (using the jquery metadata plugin) for supplying information about the form and how the ajax request should be handled.

The problem is that when I add such metadata to the form, jquery.validate tries to find matching rules and crashes because those don't exist when validating the form.

For example my form tag might look like this:

<form class="{this_is_just_some_random_metadata:true}" ...>

And this crashes jquery validate.

The problem is easy to fix by modifying the check function in jquery.validate, but I am wondering whether I might be missing something. Certainly I can't be the first guy to use the metadata plugin for both validation and other purposes.

Thanks for your help,

Adrian