JavaScript
  Home arrow JavaScript arrow Comparing Fields and Customizing Error Mes...
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

Comparing Fields and Customizing Error Messages with jQuery`s Validator Plug-in
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-11-10

    Table of Contents:
  • Comparing Fields and Customizing Error Messages with jQuery`s Validator Plug-in
  • Review: validating numeric values and file extensions
  • The equalTo argument
  • The showErrors() method

  • 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


    Comparing Fields and Customizing Error Messages with jQuery`s Validator Plug-in


    (Page 1 of 4 )

    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.

    Among the huge variety of plug-ins developed for the jQuery JavaScript library, there’s one that stands out from the rest because of its great functionality and flat learning curve. Of course, as you might have guessed, I’m talking about Validator, a compact and efficient component that allows you to validate web forms in the client by using all sorts of clever options. Thus, if you’re interested in learning how to incorporate this plug-in into your own web applications, then don’t hesitate anymore; start reading this group of articles now.

    Now that you know what to expect from this series of articles, it’s time to review the topics that were discussed in the last episode. In that tutorial I explained how to utilize the “number” and “accept” options to validate numeric values and file extensions with extreme ease. In particular, the ability of the Validator plug-in to check file extensions can be really useful when developing a web application that will let users upload their files to the web server, assuming that this process will be always backed up by strong server-side validation.

    Fortunately, the form checking options provided by Validator don’t stop here. It offers a few more that also deserve a closer look. In this last article of the series, I’m going to demonstrate how to use the plug-in to compare values between two fields of a web form. This can be helpful when implementing a classical password confirmation mechanism.

    Additionally, I’m going to show you how to tweak the plug-in a bit to make it display custom error messages in a simple manner. So let’s move on and tackle the final part of this educational journey now!

    More JavaScript Articles
    More By Alejandro Gervasio


       · This last article of the series demonstrates how to use the jQuery Validator plug-in...
     

    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 7 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek