jQuery Validation plugin: disable validation for specified submit buttons

后端 未结 12 831
故里飘歌
故里飘歌 2020-11-22 16:14

I have a form with multiple fields that I\'m validating (some with methods added for custom validation) with Jörn Zaeffere\'s excellent jQuery Validation plugin. How do you

12条回答
  •  我在风中等你
    2020-11-22 16:46

    This question is old, but I found another way around it is to use $('#formId')[0].submit(), which gets the dom element instead of the jQuery object, thus bypassing any validation hooks. This button submits the parent form that contains the input.

    
    

    Also, make sure you don't have any input's named "submit", or it overrides the function named submit.

提交回复
热议问题