Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery.validate.unobtrusive dynamic content

$(document).ready(function () { 
    rebindvalidators();
});

function rebindvalidators() {
    var $form = $("#id-of-form");
    $form.unbind();
    $form.data("validator", null);
    $.validator.unobtrusive.parse($form);
    $form.validate($form.data("unobtrusiveValidation").options);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamic #content
ADD COMMENT
Topic
Name
4+3 =