开发者

Unobtrusive Javascript Validation with MVC 3, is preventing me validating form manually

For 90% of my site the standard MVC annotation with cl开发者_如何学JAVAient script method is working a treat. But I have a form on the site that is quite complicated with multiple instances of dynamic form content dependant on answers to questions etc.

If I have the unobtrusive script included on the page, it's capturing the form submit and not allowing my custom jquery validate to validate the form.

I don't really want to refactor the site to have a seperate layout to remove the script when it's not needed. I wondered if there was an easy way to give control back to my custom validate script.

Any help would be great.


In your view you can disable client side validation like this

Html.ViewContext.ClientValidationEnabled = false
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜