/ Published in: JavaScript
this requires jquery.js, jquery.metadata.js, and jquery.validate,js
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//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") ); } });