What are the complete set of Steps Required for client-side unobtrusive validation to work for dynamically inserted form fields?
At this point I believe the following is a complete set of requirements:
Html.BeginForm
ClientValidationEnabled
UnobtrusiveJavaScriptEnabled
Html.BeginForm
call, use a relevant workaround (see workaround 1 and workaround 2)jquery
, jquery.validate.js
, and jquery.validate.unobtrusive.js
files, in that orderjQuery.validator.unobtrusive.adapters
jQuery.validator.addMethod
.$(document).ready()
as at that point it's too latejQuery.validator.unobtrusive.parse
or jQuery.validator.unobtrusive.parseElement
on elements added dynamically after the initial page load.