ASP.NET MVC3客户端验证警惕 [英] ASP.NET MVC3 Client-Side Validation with alert
本文介绍了ASP.NET MVC3客户端验证警惕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法开箱通过警报,而不是跨越,以显示客户端验证消息?
is there a way out of the box to display the client side validation message through an alert instead of span?
谢谢...
推荐答案
这只是jQuery的验证,所以你应该能够做到平时的:
It's just the jQuery validator, so you should be able to do the usual:
if (jQuery.validator) {
jQuery.validator.setDefaults({
showErrors: function (errorMap, errorList) {
// do stuff
}
});
}
这篇关于ASP.NET MVC3客户端验证警惕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文