jquery validate always returning true

前端 未结 5 1254
北荒
北荒 2020-12-31 21:16

I am using MVC4 w/JQuery and I have a form I created using the @Ajax.BeginForm. It has required fields (set on its view model). I am trying to validate the form before it is

5条回答
  •  情书的邮戳
    2020-12-31 22:12

    I was referencing both files:

    • jquery.validate.js
    • jquery.validate.unobstrusive.js <-- remove this reference !

    removing reference to jquery.validate.unobstrusive.js, fixed it for me

    hope this helps somebody

提交回复
热议问题