Skip to content

Instantly share code, notes, and snippets.

@nelsonJM
Created February 13, 2013 21:53
Show Gist options
  • Select an option

  • Save nelsonJM/4948699 to your computer and use it in GitHub Desktop.

Select an option

Save nelsonJM/4948699 to your computer and use it in GitHub Desktop.
jQuery: Validity code snippet
//Validity plugin
<link rel="stylesheet" href="javascripts/validity/jquery.validity.css">
<script src="javascripts/validity/jquery.validity.js"></script>
<script>
(function($){
$("#quote-form").validity(function() {
$("#firstname").require("Please provide your full name");
$("#youremail")
.require("Please provide an email address.")
.match("email");
$("#phone").require("Please enter your phone number.");
});
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment