jQuery 验证:允许表单提交,尽管有错误

发布于 2024-12-07 08:39:42 字数 527 浏览 0 评论 0原文

我遇到了 jquery 表单验证 插件的问题。它允许在 IE 中提交表单,如果修复了两个先前无效的必填字段(即使还有其他无效字段),也允许在 Firefox 中提交表单。

http://superuntitled.com/dev/index.html

js最基本的使用validate()

$("#emailform").validate();

类名已正确设置(requiredemail)。

这个脚本有没有任何陷阱或错误?

我正在使用 jQuery 1.6.2 和 jQuery 验证插件 1.8.1

I am running into issues with the jquery form validation plugin. It is allowing the form to be submitted in IE, also, it is allowing form submission in Firefox if two previously invalid required fields are fixed (even if there are other invalid fields).

http://superuntitled.com/dev/index.html

The js is the most basic use of validate()

$("#emailform").validate();

The class names are correctly set (required, email).

Are there any none gotchas or bugs for this script?

I am using jQuery 1.6.2 and the jQuery Validation Plugin 1.8.1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇俏 2024-12-14 08:39:42

您可能会触发 JavaScript 异常,从而导致脚本终止。一旦发生这种情况,就会提交默认表单,因为这将是没有 JS 的正常 HTML 操作。

You may be triggering JavaScript exceptions, which are causing your script to terminate. Once that happens, the default form is submitted, as that would be the normal HTML action without the JS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文