jQuery-Validation-Engine icon indicating copy to clipboard operation
jQuery-Validation-Engine copied to clipboard

Cancel validation on save button.

Open lreindl opened this issue 15 years ago • 3 comments

I have two submit buttons. One "Process" button and one "Save" Button. When the "Save" button is clicked I want to skip all validation and fire my save method on server side, but if there are empty required fields the validation engine prevents my button from doing this. All I basically need is a method that basically shuts it off.

lreindl avatar Oct 06 '11 15:10 lreindl

there is no skip option but you could do $("#gormID").serialize to get all the output or you could do detach, but that would be messy

posabsolute avatar Oct 06 '11 15:10 posabsolute

Could you give me a brief explanation on how I would go about using detach?

lreindl avatar Oct 07 '11 14:10 lreindl

well doing $("#formId").validationEngine("detach") will remove any validation, you will have to reattach it after, tahts why you better with form serialize()

posabsolute avatar Oct 07 '11 17:10 posabsolute