Use the meta-option to namespace metadata for the validation plugin: $("...").validate({ meta: "rules" }); class="{rules:{required:true}}"
Jörn On Sat, Jul 12, 2008 at 7:49 PM, Dreftymac <[EMAIL PROTECTED]> wrote: > > Problem: > ===== > It appears that jQuery validator plugin always assumes that metadata > attached to an element is intended for use by the validator plugin, > when metadata is attached to an element and validator plugin does not > know what to do with it, it throws an error: > > TypeError: jQuery.validator.methods[b.method] has no properties > > Steps To Reproduce: > ===== > Use the validator plugin as normal, and create your validation rules > using the format: > > $('#myform').validate({...}) > > Then, add any custom metadata to an input element, where the custom > metadata is > intended for use by something else besides validator > > class="has_metadata {mymeta:{foo:'helloworld'}}" > > Then, run your code as usual, and jQuery.validator throws the above > message. > > If no one has a proposal for how to fix this, is it possble to to > attach metadata to an element using other means so that metadata and > validator can work together at the same time but for different > purposes? > >