We'll continue working with the form we've been creating through the last three sections. Follow these steps to validate user entry into the form:
The first thing we'll do is download the Validation plugin and get it attached to our page.
Head over to http://bassistance.de/jquery-plugins/jquery-plugin-validation/ and click on the Download button in the Files section to download a ZIP file.
Open up the ZIP file and take a look at what we've got.
There's a lot going on here. Several different JavaScript files, a changelog, and so on. Remember how I said this plugin is powerful and can handle lots of different approaches to validation? That's what all this is for. Handling form validation in just about any old crazy situation you might find yourself in.
Luckily, though, our situation is pretty simple, so we don't have to do anything complicated.
Copy
jquery.validate.min.js
to your ownscripts
folder and attach it to your page.<script src="scripts...