Steve Blades schrieb:
Whoops! One last thing. An 'onValidationFailure' type of method,
allowing someone to run some scripting should the validation fail
(like resetting data changes one might have made in the beforeSubmit
call). You may even want to split things further, with a
'beforeValidation' (occurring prior to validation) separate from a
'beforeSubmit' (occurring after validation, and prior to the form
submit). Just a thought.
Currently my plan is to add the following options:
- onsubmit: Boolean, default true - validate on form submit (similar to
onkeyup/onblur)
- beforeValidation: Callback, called before doing any validation
- beforeSubmit: Callback, called before submitting the form (default
submit or calling submitHandler, if specified)
I'm not sure yet if beforeValidation should be called only for the
entire form or also when validating a single element. Opinions?
-- Jörn