MVC5 jQuery 動的項目の検証を有効にする
var form = $(formSelector) .removeData("validator") /* added by the raw jquery.validate plugin */ .removeData("unobtrusiveValidation"); /* added by the jquery unobtrusive plugin */ $.validator.unobtrusive.parse(form);
こーゆーの見かけるが役に立たない(ajaxCompleteのタイミングもparseメソッドも)。
古いバージョンでは有効なのだろうか?
$(function () { //parsing the unobtrusive attributes when we get content via ajax $(document).ajaxComplete(function () { $.validator.unobtrusive.parse(document); }); });
asp.net mvc 4 - unobtrusive validation not working with dynamic content - Stack Overflow
http://stackoverflow.com/questions/14902581/unobtrusive-validation-not-working-with-dynamic-content
Applying unobtrusive jquery validation to dynamic content in ASP.Net MVC | XHalent Coding…
https://xhalent.wordpress.com/2011/01/24/applying-unobtrusive-validation-to-dynamic-content/