Skip to content

Instantly share code, notes, and snippets.

@chrsr
Created March 9, 2012 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrsr/2005220 to your computer and use it in GitHub Desktop.
Save chrsr/2005220 to your computer and use it in GitHub Desktop.
Successful validatejs example
validatejs = new FormValidator(form, rules, function(errors, events) {
if (errors.length > 0) {
// show errors
event.preventDefault(); // + ie6 equivalent
} else {
// do stuff before form submission
return true;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment