jQuery验证:在不清除表单的情况下重置错误消息 [英] jQuery validation: reset error messages without clearing the form

查看:89
本文介绍了jQuery验证:在不清除表单的情况下重置错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想重置表单上检测到的错误而不清除表单内容.因此,在这种情况下,validator.resetForm()将不起作用.

I want to reset the errors detected on the form without clearing the form contents. So for this case, validator.resetForm() wont work.

我该如何实现?

推荐答案

您可以(调整是否有自定义错误)...

You could do (adjust if you have custom errors)...

form.find('label.error').remove();

这篇关于jQuery验证:在不清除表单的情况下重置错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆