开发者

ASP.NET MVC 3 jQuery client validation - disable for specific button (Ajax form)

How can I disable validation for one button inside the Ajax begin form?

Using jQuery validation I tr开发者_开发问答ied many ways from Google, but none of them worked (class="cancel", disableValidation attribute, etc.).


There may be other ways, but one for sure way is to remove all the validation rules if using unobtrusive validation via:

http://docs.jquery.com/Plugins/Validation/rules#.22remove.22rules


$('#frmMyName').validate().cancelSubmit=true;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜