Add Rules On Dynamic Form

前端 未结 2 819
迷失自我
迷失自我 2021-01-26 13:19

I\'m trying to add validation rules on a form that is dynamically populated, depending on a JSON response from a back-end. I\'m using jQuery 1.9.1 and jQuery Validation plugin.<

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-26 13:57

    I think the error is thrown from the validator plugin,

    var settings = $.data(element.form, "validator").settings;

    May be the 'id' is not referred properly.

提交回复
热议问题