Your host:
Stephen Chapman
Stephen Chapman

Text Field Validation Tutorials

The following articles form a tutorial series introducing you to how to validate text fields with Javascript. The tutorials were written for the http://javascript.about.com/ web site (for which Ask Felgall author Stephen Chapman is now the Guide) and the links below will open the articles directly from that site.

  1. Mandatory Input
    The first in this tutorial series on text field validation shows you how to test that something has been entered.
     
  2. Alphabetic and Numeric Validations
    Often only a certain range of characters is valid in a field. This tutorial shows you how to test that what is entered is from those valid characters.
     
  3. One and Only One
    This tutorial covers validating that the field contains at least one of a specified character or only one of a specified character.
     
  4. Adjacent Characters
    When two (or more) specific characters must always appear together or never appear together you need to validate adjacent characters.
     
  5. Only Adjacent
    Sometimes some characters must only appear next to certain others but those other characters may also appear separately. This more complicated validation handles this.
     
  6. Character Order
    Sometimes the characters need to be in a particular order but may (or must) have other characters in between.
     
  7. Minimum and Maximum Distance
    How to validate that a certain number of characters appear between certain specific ones.
     
  8. Starting Values
    e that the text string that has been entered starts with one of a set range of values.
     
  9. Ending Values
    w to validate that the text string that has been entered ends with one of a set range of values.
     

go to top

Add to del.icio.us

Loans - Mortgages - United Specialties - Credit Cards