Validation jQuery plugin ( remove label )

Validation jQuery plugin ( remove label )

Hello to the community!

About jquery.validate.js, it'd be nice to have a settable option for the appearance of the label element.
I hacked a bit the code to do that.
I used a new option ( errorDisplay ) which you can set true of false if you need the label element or not.
The hacked code is

  1. $.extend($.validator, {
       
        defaults: {
            messages: {},
            groups: {},
            rules: {},
            errorClass: "error",
            validClass: "valid",
            errorElement: "label",
            errorDisplay: true,
            .....
            .....










and
  1. showLabel: function(element, message) {
                var label = this.errorsFor( element );
                if(!this.settings.errorDisplay) return;
                if ( label.length ) {
                .....
                .....





In this way I can set the option errorDisplay to false if I don't want the label element.

If you think that this is an awful idea, please, help me to improve the all concept!

Thank you!