Form Field Validation JavaScript Forms
Web Scripts Catalog New listings Rate your script Popular scripts Link your page to Web Scripts Catalog Top rated scripts Search in Web Scripts Catalog
Scripts Catalog: web scripts download - PHP ASP JavaScript Perl Java and others!  
ASP[1293]
ASP.NET[230]
Books[296711]
CGI and Perl[1856]
Java[889]
JavaScript[1533]
PHP[3925]
Python[47]
Remotely Hosted Scripts[771]
Tools and Utilities[977]
Web Hosting[121]
XML[16]
search
Login Web Scripts Forum Web Scripts Catalog FAQ Send us your feedback About Web Scripts Catalog


Clipart.com. Unlimited access to more than 7,000,000 clipart images, photos, fonts, and sounds!




Scripts / JavaScript / Forms
Visitors rating: 4.14.14.14.14.1

Form Field Validation

This series of functions provide common form field validation.You customize the "validateForm" function to make calls to the following functions with your form fields.If the validation fails, the functions will alert the user with a message and put the text input focus on the field with the error.


validRequired(formField, fieldLabel) -- checks for a field being empty
validEmail(formField, fieldLabel, required) -- checks for a correctly formatted email address
validNum(formField, fieldLabel, required) -- checks for a valid number (a string where all the characters are digits)
validInt(formField, fieldLabel, required) -- checks for a number (integer) that can be correctly parsed with the function parseInt
validDate(formField, fieldLabel, required) -- checks for a correctly formatted date

The parameters to these functions are defined as:
formField -- the document reference to your form field (e.g., myform.fieldName)
fieldLabel -- the user friendly string that you want the error message to refer to your field by
required -- whether the field is required to be filled in by the user (true/false)
To add to your form, add the onsubmit handler to the form tag as shown in the example code.

Author: Robert Dominy
Price: Free
Platform(s): IE 3.0+, NS 3.0+
Rate It! Number of Votes: 10

Script Links:
  • Form Field Validation Home
  • Download/Order Form Field Validation
  • Form Field Validation Demo

  • Discuss This Script on Forum
  • Request Installation
  • Images:
    Form Field Validation Form Field Validation

    Scripts Installation

    Custom programming at freelancewell
    Freelancewell.com helps webmasters, web designers, programmers, software developers and business owners to develop their projects. Buy services with help from our secure escrow system. Deposit money and don't purchase until your project is completed. We have thousands of satisfied clients around the world. Companies of any size have used our web services.

    Visit freelancewell at www.freelancewell.com or contact at info@freelancewell.com.
    Scripts Catalog | New Listings | Get rated | Most Popular | Links to Us | Top Rated | Search DB | FAQ | Send Feedback | Advertisement | About Us
    Custom Programming All scripts presented on this site are the property of their respective owners.