jQuery Validate Plugin - 单个字段的触发验证 [英] jQuery Validate Plugin - Trigger validation of single field

查看:490
本文介绍了jQuery Validate Plugin - 单个字段的触发验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格可以选择通过facebook连接预先填充。用户连接后,会自动填写其姓名和电子邮件。问题是这不会触发远程验证以检查电子邮件是否已存在。

I've got a form that can optionally be pre-populated via facebook connect. Once a user connects, their name and email are automatically filled in. The problem is that this doesn't trigger the remote validation to check if the email already exists.

有没有办法可以单独调用该字段的验证?类似于:

Is there a way I could call the validation on that field alone? Something like:

$('#email-field-only')。validate()

会是个主意。通过文档搜索没有运气。

would be idea. Searched through the docs with no luck.

推荐答案

这种方法似乎可以做你想要的:

This method seems to do what you want:

$('#email-field-only').valid();

这篇关于jQuery Validate Plugin - 单个字段的触发验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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