jQuery Validation - Hide Error Message

后端 未结 10 1660
醉梦人生
醉梦人生 2021-02-05 03:39

I\'m using the jQuery Validation plugin and want to disable the or element/container it creates to display the error \'message\'.

Basically, I want the input element wi

10条回答
  •  误落风尘
    2021-02-05 04:03

    I had a project that developed by another validation library, I wanted to add validate library to use its features for check the form is valid or not (used validation library doesn't have that feature)

    My soloution was : I just added validate library by its CDN

    and use validate feature on click :

    $(document).on('click','#buttonID',function(){
       var form = $( "#formID" );
       form.validate();
       console.log(form.valid());
    });
    

    and tried to hide error messages that raised by jquery validate by adding CSS code:

    label.error{
       display: none!important;
    }
    

提交回复
热议问题