Jquery Validation: Call Valid without displaying errors?

后端 未结 2 630
灰色年华
灰色年华 2020-12-24 14:02

Using JQuery Validation plugin, I am trying to call the .valid() method without the side-effects of displaying error messages on screen. I have tried a number of scenarios w

2条回答
  •  不知归路
    2020-12-24 14:23

    Well instead of trying to disable any error placement made by the plugin you could use CSS to 'force' hiding the create error messages elements. Something like:

    label.myvalidationclass { display: none !important; }
    

    Where myvalidationclass is either the default error class name or your own.

    I'm aware it is not a very nice solution but in my opinion, displaying error messages is one of the core feature of the plugin.

    d.

提交回复
热议问题