如何阻止jQuery验证自动进行验证? [英] How do I stop jQuery validate from validating automatically?

查看:71
本文介绍了如何阻止jQuery验证自动进行验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框,在上面创建了一个onblur脚本,该脚本接受输入并将其转换为日期.我正在使用jQuery validate-plugin来验证输入,但问题是来自用户的输入通常在解析之前是无效的,这使得jQuery验证进行的自动验证既多余又不必要. /p>

如何阻止jQuery验证自动验证,以便只能按需运行它?

解决方案

$('#aspnetForm').validate({
       onfocusout: false,
       onkeyup: false,
       onclick: false
});

I have a textbox on which I have made an onblur script that takes the input and converts it into a date. I'm using jQuery validate-plugin to validate the input, but the problem is that the input from the user is often not valid until I've parsed it, which makes the automatic validation that jQuery validation makes, both redundant and unwanted.

How can I stop jQuery validate from validating automatically so I can run it only on demand?

解决方案

$('#aspnetForm').validate({
       onfocusout: false,
       onkeyup: false,
       onclick: false
});

这篇关于如何阻止jQuery验证自动进行验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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