How to trigger validation without using a submit button

后端 未结 2 613
野的像风
野的像风 2021-01-01 19:38

I am using the jQuery Validation plugin and trying to trigger the validation/submit with an alternate button. I would like to create a jquery function that will change the c

2条回答
  •  情书的邮戳
    2021-01-01 19:49

    You should be able to just call valid on whatever element you like:

    $('selector').valid();
    

    Here are some references:

    http://docs.jquery.com/Plugins/Validation/valid

    http://docs.jquery.com/Plugins/Validation/validate

提交回复
热议问题