Unobtrusive validation not working on dynamically-added partial view

Ok, I am going to start over with a new answer here.

Before you call $.validator.unobtrusive.parse, remove the original validator and unobtrusive validation from the form like so:

var form = $("#main_div").closest("form");
form.removeData('validator');
form.removeData('unobtrusiveValidation');
$.validator.unobtrusive.parse(form);

This same answer is documented here.

Leave a Comment