Comparing Fields and Customizing Error Messages with jQuery`s Validator Plug-in
Welcome to the final installment of the series that shows you how to check online forms with the Validator jQuery plug-in. Made up of seven tutorials, this series explores the most useful features that come packaged with this library, and shows you how to use them for performing strict validation on your own HTML forms.
Comparing Fields and Customizing Error Messages with jQuery`s Validator Plug-in - Review: validating numeric values and file extensions (Page 2 of 4 )
It’s possible that you still haven’t read the preceding tutorial, where I explained how to use the “number” and “accept” options provided by the Validator plug-in for checking numeric values and file extensions. Therefore, below I reintroduced the examples created in that article, which show a simple use of these arguments. Here they are:
(example on using the ‘number’ option)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
As you can see, the first code sample illustrates how to use the “number” option to check if a value entered in a specific form field is numeric or not, while the last example shows a simple usage of the “accept” argument for filtering some common graphic file extensions.
At this point, you hopefully grasped how the previous examples work, so it’s time to see how to utilize the capabilities of the Validator plug-in to determine whether the values assigned to two fields of an HTML form are the same.
If you wish to learn the full details of this process, then click on the link that appears below and read the next section.