Using the form validation plugin
Plugins written by other developers can be searched and downloaded from the central plugin repository at https://plugins.jquery.com. On searching for the validation
keyword, we come across the jQuery validation plugin written in 2006 by Jörn Zaefferer, a member of the core jQuery team. The official site of the plugin is at http://jqueryvalidation.org.
In this example, let's download and use this plugin in our application. The programming constructs used in this example are summarized as follows:
Construct |
Type |
Description |
---|---|---|
|
jQuery selector |
This selects an element based on its ID. |
|
jQuery selector |
This selects all elements with the specified HTML tag. |
|
jQuery event |
This is fired when you click on an element. It corresponds to the JavaScript |
|
jQuery method |
For each matched element, this returns the first element that matches the selector by traversing up the DOM tree. |
|