Add Rules On Dynamic Form

前端 未结 2 820
迷失自我
迷失自我 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条回答
  •  梦毁少年i
    2021-01-26 13:46

    Where is .validate()?

    You cannot call plugin method rules("add") until sometime after the plugin has been initialized with .validate().

提交回复
热议问题