jQuery Validation - form.valid() always returning true

前端 未结 3 1930
再見小時候
再見小時候 2021-01-05 00:02

I have a situation when I try to check if a form is valid, but form.valid() always returns true. But if I try to validate the individual control, it returns false.

T

3条回答
  •  逝去的感伤
    2021-01-05 00:42

    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

提交回复
热议问题