Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling error messages when using the JQuery validator extension

I've searched around for a way to disable the error messages that are displayed next to invalid form elements and I have only found ways to customize the messages, not prevent them altogether.

I tried:

jQuery.extend(jQuery.validator.messages, {
    required: ""
}

But that still places a blank space next to my text boxes and throws off the positioning. Anyone know a way that I can do this?

like image 440
Slappy Griddleson Avatar asked Dec 10 '25 09:12

Slappy Griddleson


1 Answers

$('#submit').click(function(){
    $("#contactform").validate({
        errorPlacement: function(error, element) { },
        debug:true
    })
});

leaving the errorPlacement line blank did the trick.

like image 189
Slappy Griddleson Avatar answered Dec 12 '25 23:12

Slappy Griddleson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!