Skip to content

Instantly share code, notes, and snippets.

@bcalloway
Created February 23, 2009 15:37
Show Gist options
  • Save bcalloway/69001 to your computer and use it in GitHub Desktop.
Save bcalloway/69001 to your computer and use it in GitHub Desktop.
jQuery form validation
//contact-form validation
$("form#contact-form").validate({
errorPlacement: function(error, element) {
//appends error message to the p tag of the form field
error.appendTo( element.parent("p") );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment