如何查看有错误的jQuery验证列表 [英] How to see jQuery validation list of elements with errors

查看:124
本文介绍了如何查看有错误的jQuery验证列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时候,表单不会提交,因为jQuery包含一些无效元素,这些元素不会显示在错误消息中.

Sometimes, the form won't submit because jQuery has some invalid elements that will not show up in an error message.

我们如何看到这些错误以便更轻松地进行调试?

How can we see these errors in order to debug more easily ?

推荐答案

var validator = $("form").validate()
validator.errorList

将显示阻止提交表单的错误数组.

will show the array of errors that are holding back the form from submiting.

这篇关于如何查看有错误的jQuery验证列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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