Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pages/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ By default, the first invalid element in a form is focused after submitting a fo

# Form submit
By default, the form submission is prevented when the form is invalid, and submitted as normal when it is valid. You can also handle the submission manually (option submitHandler).
If there's error in the form when submitting and you need to perform additional operation you can use the invalidHandler (option invalidHandler).

## Skipping validation on submit
To skip validation while still using a submit-button, add a class="cancel" to that input.
Expand All @@ -105,4 +106,4 @@ While developing and debugging the form, you should set the debug option to true
Some issues are caused by certain form element's names. A name you should avoid is "submit" (for submit buttons and anything else). Browsers expose form elements as properties of the form element, by their name, in this case hiding native methods like submit(). Just don't use name="submit" and you're good.

# Validating multiple forms on one page
The plugin can handle only one form per call. In case you have multiple forms on a single page which you want to validate, you can avoid having to duplicate the plugin settings by modifying the defaults. Use <a href="/jQuery.validator.setDefaults/">jQuery.validator.setDefaults</a> to override multiple settings at once.
The plugin can handle only one form per call. In case you have multiple forms on a single page which you want to validate, you can avoid having to duplicate the plugin settings by modifying the defaults. Use <a href="/jQuery.validator.setDefaults/">jQuery.validator.setDefaults</a> to override multiple settings at once.