Trouble getting unobtrusive validation working with mvc 3 on jquery ajax post

后端 未结 1 1023
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-15 08:50

I have having a lot of trouble getting validation to work on MVC3. It works fine when I just load the page directly, but it does not validate when I use jquery AJAX POST:

相关标签:
1条回答
  • 2020-12-15 09:04

    Solved

    Calling $.validator.unobtrusive.parse($('form')) did the trick. I guess the validator needs to be recreated for dynamic content

    0 讨论(0)
提交回复
热议问题