Jquery Validate - 类列表

发布于 2025-01-06 18:01:35 字数 261 浏览 2 评论 0原文

这可能是一个非常愚蠢的问题,但我正在寻找 jquery 表单验证器的内联验证规则列表。

我知道我可以在这里找到 js 函数

但我正在寻找一个列出简单的内联类,如

电子邮件、网址、电话等,并学习如何使用它们。我只是在寻找一个简单的列表。谢谢。

This may be a very stupid question but i am looking for a list of the inline validation rules for the jquery form validator.

I know that i can find the js functions here:

but i am looking for a list of the simple inline classes like

email, url, phone, etc., and learn how to use them. I am just looking for a simple list. Thank you.

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

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

发布评论

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

评论(2

同尘 2025-01-13 18:01:35

查看源代码,我相信这些是唯一可以通过添加类来使用的规则:

  • 必需的
  • 电子邮件
  • url
  • 日期 日期
  • ISO
  • 号码
  • 数字
  • 信用卡

至于如何使用它们,只需将它们添加到您的 class 属性中即可。 input

<input type='text' class='required creditcard' name='credit-card' />

您必须在传递给validate 的对象中定义其他规则。

Looking at the source, I believe these are the only rules that can be used simply by adding classes:

  • required
  • email
  • url
  • date
  • dateISO
  • number
  • digits
  • creditcard

As for how to use them, just add them into the class attribute of your input:

<input type='text' class='required creditcard' name='credit-card' />

You'll have to define other rules in the object you pass to validate.

温柔少女心 2025-01-13 18:01:35

您很可能正在寻找这个

http:// /elegantcode.com/wp-content/uploads/2010/03/Jquery-Validator-Cheat-sheet.pdf

当我寻找相同的易于记住的验证插件列表时创建规则。 :)

更新:如果您喜欢将所有东西放在一起,也可以尝试以下操作:

http://marketblog.envato.com/resources/extective-collection-cheatsheets-web-designers

Most probably you are looking for this

http://elegantcode.com/wp-content/uploads/2010/03/Jquery-Validator-Cheat-sheet.pdf

Founded when I was looking for same easy to remember list of validation plugin rules. :)

Update: If you like to have all things together try this too:

http://marketblog.envato.com/resources/extensive-collection-cheatsheets-web-designers

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