jQuery Validate - Hide display validation error messages / show custom errors

前端 未结 3 545
梦如初夏
梦如初夏 2020-12-23 19:13

I\'m using jQuery Validate, but I really don\'t want to have any error messages whatsoever. Rather, I need to have red boxes around offending inputs/selects/etc. These red b

3条回答
  •  青春惊慌失措
    2020-12-23 19:51

    This is how I do it. Just put $.validator.messages.required = ''; before your call to initialise validate() i.e.:

    $.validator.messages.required = '';
    $('#formData').validate({});`
    

    This will make it show the styles on the inputs, but no message labels!

提交回复
热议问题