Using Rangelength, Min and Max with the Validator jQuery Plug-in
When it comes to validating web forms in the client, one of the most effective and elegant applications that can be used nowadays is the Validator jQuery plug-in. It's a compact and powerful piece of software written by Jörn Zaefferer that allows you to check data collected through online forms with ease in a truly unobtrusive way.
Using Rangelength, Min and Max with the Validator jQuery Plug-in (Page 1 of 4 )
So, if you’re particularly interested in learning how to put this handy plug-in to work for you in a short time, then you should take a look at this group of articles. In them you’ll find a comprehensive guide that will show you how to master the plug-in’s basic features, and how to use its numerous additional options to validate user-submitted data in a stricter fashion. This is the third part of a seven-part series.
And now that you've been introduced to the subject of this article series, it’s time to review the topics that were discussed in the last tutorial. In that installment I went through the development of a couple of basic examples that demonstrated how to use the “minlength” and “maxlength” options provided by the Validator program for specifying the minimum and maximum lengths for certain fields of the form being validated.
More concretely speaking, those examples showed how to utilize these arguments both separately and in conjunction. However, the Validator plug-in offers an abbreviated option that allows you to check if data entered in a particular form field is within a specified length range. Not surprisingly, this option is called “rangelength.” There are also a few other arguments that can be used for specifying a numeric range. Therefore, in this third part of this series, I’ll be taking a close look at them, as usual by means of a hands-on approach.
So let's continue exploring the arguments provided by the Validator plug-in. Let’s get started!