JavaScript
  Home arrow JavaScript arrow Validating Digits and Dates with jQuery`s ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Validating Digits and Dates with jQuery`s Validator Plug-in
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2009-11-06

    Table of Contents:
  • Validating Digits and Dates with jQuery`s Validator Plug-in
  • Review: the range, email and url options
  • Introducing the digits parameter
  • Checking valid dates with the date option

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Validating Digits and Dates with jQuery`s Validator Plug-in


    (Page 1 of 4 )

    In this fifth installment of a seven-part series on the jQuery JavaScript framework's Validator plug-in, I introduce the “digits” and “date” options. They're very useful for verifying that specified fields of a targeted form contain numeric values and valid dates.

    In case you haven’t heard, the Validator plug-in is a powerful jQuery add-on which allows you to validate web form in the client by using some straightforward options. From doing something as simple as checking for empty strings and numeric ranges, to performing more complex validations, such as verifying email addresses and URLs, Validator can really enhance the behavior of web applications that collect user-supplied data through one or multiple HTML forms.

    So, if you’re web designer who wishes to master the main features that come with this useful jQuery plug-in, then you should take a close look at this series of articles. In it you’ll find a friendly, hands-on guide that will teach you how to work with the numerous validation options provided by the Validator program.

    Naturally, if you've already read the previous chapter of this series, then you'll be familiar with using the plug-in to validate numeric ranges, email addresses and URLs. In that tutorial  I explained how to perform all of these tasks by using the “range,” “email” and “url” arguments respectively. Indeed, checking if certain fields of a targeted web form satisfy these specific requirements is a simple process that doesn’t present major problems.

    As I said before, though, the Validator plug-in comes bundled with many other checking options that also deserve a closer analysis. Thus, in this fifth episode, I’m going to discuss the usage of the “digits” and “date” arguments. They can help you verify if a field on a form has been filled in only with digits, and if it contains a valid date.

    Now, it’s time to leave the preliminaries and learn how to implement these brand new validation options for checking digit-based data. Let’s jump in!

    More JavaScript Articles
    More By Alejandro Gervasio


       · This fifth episode of the series discusses the usage of the "digits" and "date"...
       · Your tutorials have been a lot of fun and, of course, very easy to catch the point. ...
       · Thanks for the compliments on my articles on jQuery. Glad to know you found them to...
     

    JAVASCRIPT ARTICLES

    - Toggling CSS Properties with the GX JavaScri...
    - Cancel, Queue and Pause Animations with the ...
    - Producing Elastic Effects with the GX JavaSc...
    - Moving Divs Diagonally with the GX JavaScrip...
    - Moving Elements Vertically and Horizontally ...
    - Making Bouncing Effects in Parallel with the...
    - Creating Bouncing Effects with the GX JavaSc...
    - Manipulating Background Colors with the GX J...
    - The GX JS Animation Framework
    - Debug Ajax-Generated Tags in Firefox
    - Building a Page Controller with the jQuery Q...
    - Paginating Database Records with the jQuery ...
    - Paginating Images with the jQuery Quick Pagi...
    - Hiding the Page Counter with the jQuery Quic...
    - Introducing the Quick Pagination jQuery Plug...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek