Created
February 13, 2013 21:53
-
-
Save nelsonJM/4948699 to your computer and use it in GitHub Desktop.
jQuery: Validity code snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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