添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steps to reproduce

Complete the form with all required fields and submit.
You'll notice that if you incorrectly complete the email or phone field, those validate just fine. However the simple submitHandler never fires. I also tried just using submitHandler with no rules, and got the same result.
https://jsfiddle.net/usznkfzs/ .

Expected behaviour

Ideally email and phone fields would be validated by the plugin then it would fire the function in the submitHandler

Actual behaviour

Email and phone are validated, however nothing fires in the submitHandler once all fields are validated.
I've also tried using debug:true rather than preventDefault. However debug:true doesn't seem to do anything either for me.

Hi there,

You shouldn't be attaching a handler on the submit event of the form, you should let validate plugin handle the event for you and then you can do your stuff in submitHandler prop of validate plugin.

Here's the correct fiddle: https://jsfiddle.net/usznkfzs/1/