开发者

JQuery Validation - Show/Hide a label rather than use its message

开发者 https://www.devze.com 2022-12-11 22:22 出处:网络
I can\'t figure out the errorPlacement method of the jQuery validation plugin - for u开发者_运维知识库se with my checkboxes anyway. I want to just make the script show/hide a label if there\'s an erro

I can't figure out the errorPlacement method of the jQuery validation plugin - for u开发者_运维知识库se with my checkboxes anyway. I want to just make the script show/hide a label if there's an error.

Does anyone know where I put my code to be triggered when the validation finds an error? I think I can use success: to make it hide the label.

This is just for one element, so I need to be able to specify it somehow.

Thanks


You probably want to use the invalidHandler and submitHandler hooks to provide your custom behavior. This will allow you to override the default mechanisms for showing/hiding errors.

0

精彩评论

暂无评论...
验证码 换一张
取 消