jQuery form validate not working

前端 未结 2 523
孤独总比滥情好
孤独总比滥情好 2021-01-05 17:54

I\'ve spent hours on this and I have no idea why this jquery validate() doesn\'t work. I finally broke it down to minimum and it still doesn\'t work. This is the actuall cod

2条回答
  •  情深已故
    2021-01-05 18:05

    .validate() doesn't actually perform the validation, it configures the form for validation.

    If you change your submit link to a submit button , it will work as expected.

    Another option is to call .valid() in your link click handler, which will trigger validation.

    See this fiddle for a working example: http://jsfiddle.net/v5HQr/1/

提交回复
热议问题