Question

For 90% of my site the standard MVC annotation with client 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.

Was it helpful?

Solution

In your view you can disable client side validation like this

Html.ViewContext.ClientValidationEnabled = false
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top