Remove jQuery validation on specific button

So you’ve just built what is the best form ever! It has 1 set of fields, 3 buttons – save, delete, cancel. Pixel perfect styling as per the designers Photoshop file, and the CSS that anyone would dream of. And then it stops working! You click the cancel button! It validates the form!! NO! It’s a cancel button. It should stop what you are doing. Really simple fix, and am just writing it down here because I will forget.

The Solution

Add a css class of cancel on to your button. That’s it. Simple!

Leave a Reply

Your email address will not be published.