I have a wizard which contains a very large form. The wizard has an area where the user chooses one of two options which shows and hides a div with other input elements. The problem is that the hidden elements are being validated and i need to turn validation off on those certain elements.
I've tried: $('.data-panel').find('input[type="text"], textarea, select').attr('disabled', 'disabled');
as state in this thread, but it will still validate those input elements. MVC3 unobtrusive validation: how to remove/re-attach validation from a group of elements?
I thought about injecting/remove a partial view, but those elements won't validate when they need to be validated.
I'm opening for any work arounds. Thanks!