在ASP.NET MVC 3中对模糊进行远程属性验证 [英] Remote attribute validation on blur in asp.net mvc 3
本文介绍了在ASP.NET MVC 3中对模糊进行远程属性验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
asp.net mvc 3中的内置远程属性执行验证"onchange".
我希望它在模糊时进行验证,是否可以自定义它?还是有其他方法可以这样做?我敢肯定这是非常普遍的需求.
The build in remote attribute in asp.net mvc 3 does the validation "onchange".
I want it to validate on blur, is there a way to custom it? or there is something else for doing so? I'm sure it's a very common need.
推荐答案
您可以设置默认值像这样,并在按下键时禁用验证:
You could set default values like this and disable validation when a key is pressed:
$.validator.setDefaults({ onkeyup: false });
这篇关于在ASP.NET MVC 3中对模糊进行远程属性验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文