Posted By

bcalloway on 09/24/08


Tagged

form jquery validation


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

benrudolph
classicalart
loric


jQuery Form Validation


 / Published in: JavaScript
 

this requires jquery.js, jquery.metadata.js, and jquery.validate,js

  1. //contact-form validation
  2. $("form#contact-form").validate({
  3. errorPlacement: function(error, element) {
  4. //appends error message to the p tag of the form field
  5. error.appendTo( element.parent("p") );
  6. }
  7. });

Report this snippet  

You need to login to post a comment.