[英]Avoid performing client side validation when typing
I noticed that validation occurs even when i am typing. 我注意到即使在输入时也会进行验证。 What i would like is that it only performs validation when another field is selected or when clicked on the submit button.
我想要的是,它仅在选择另一个字段或单击提交按钮时才执行验证。
Is there a way to prevent validation when typing? 输入时有没有办法防止验证?
If you want to disable as-you-type validation for all fields, try doing this: 如果要禁用所有字段的按需输入验证,请尝试执行以下操作:
$(function(){
$.validator.setDefaults({
onkeyup: false // disable onkeyup events
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.