Karan Sev schrieb:
Hi,
I have button (type: submit) with the class 'cancel' but this still
results in the form being validated. It works if I change the button
to an input.
After

// allow suppresing validation by adding a cancel class to the submit
button
this.find("input.cancel:submit").click(function() {
        validator.cancelSubmit = true;
});

To fix this on line 42 I added,

// allow suppresing validation by adding a cancel class to the submit
button
this.find("button.cancel:submit").click(function() {
        validator.cancelSubmit = true;
});

I know this might be on a tangent, but was this just a simple omission
or are button evils and I should stick with inputs?
This was just an ommision. How about just ".cancel:submit" as the selector? That would match both inputs and buttons.

Jörn

Reply via email to