📜  jquery.validate.unobtrusive 动态内容 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:48.682000             🧑  作者: Mango

代码示例2
$(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);
}