$('#publish_form').validate({ event: 'blur', rules: { number_field: { required: true, number: true } // You know what to put here }, errorPlacement: function (error, element) { error.insertBefore(element.parents('div.pair_row').find('div.info')); } });
Using the errorPlacement event/callback you can place the label whereever you want. It's automatically generated with class="error" so you can apply styling to it. Regards, Emil Ivanov On May 20, 10:59 pm, Scott Moore <[EMAIL PROTECTED]> wrote: > Not sure if I'm just missing this or what, but I'm using Jörn's > wonderful form validation plug-in and can't seem to find how to add an > error class to the label next to the input field that didn't > validate. > > Please don't mistake this as a question about the error messaging, as > that's working just fine. But I also want to add that same error class > to the label of the failed input. > > Any thoughts?