Miscellaneous

  Home arrow Miscellaneous arrow Form and Spelling Validation
MISCELLANEOUS

Form and Spelling Validation
By: Matt Wade
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2003-07-20

    Table of Contents:
  • Form and Spelling Validation
  • Common Form Validations
  • Spell Checking
  • Summary

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Form and Spelling Validation


    (Page 1 of 14 )

    Most dynamic web sites rely heavily on forms. From user authentication to entry of news items, we use forms to accept user input. There are many different ways we can validate data from the user. In this tutorial, we will examine several of the more common items that need validation and provide examples for each. We will also explore how to check documents for misspelled words and suggest proper replacements.

    Most dynamic web sites rely heavily on forms. From user authentication to entry of news items, we use forms to accept user input. There are many different ways we can validate data from the user. In this tutorial, we will examine several of the more common items that need validation and provide examples for each. We will also explore how to check documents for misspelled words and suggest proper replacements.

  • Common Form Validations - We will use a combination of string functions and regular expressions to validate common data submitted via forms.
  • Spell Checking - Web sites with misspellings look unprofessional. In this section, we will detail how to spell check text input from a form. The spell check script examined in this section will present a practical demonstration of how regular expressions and standard string functions can be used together to perform a useful function.

    Before we jump into the examples, let's talk a little bit about form validations in general. First off, what is form validation? Simply put, it is the process of validating information from a form. This information will vary greatly and could be anything from proper names to zip codes. Validating the data means ensuring that it complies to a set of rules or guidelines.

    You may be wondering why we need to validate data from forms. If we don't validate data coming in from forms, we could end up with totally useless information. Imagine you have a form where you have three fields - name, phone number, and email address. What good does it do you if someone enters in garbage in each of these fields? If you aren't validating the information from these fields, you have no way of controlling the information.

    Another important aspect of form validation is security. By validating the information you receive via a form before using it elsewhere, you can reject or strip out any potentially harmful data and avoid a security breach. It certain situations it is important to be sure that you aren't accepting overly long data. If you were to accept user input from a form and then input that into your database without checking the length of the data submitted, a malicious person could quickly fill up your database.

    In this tutorial, we will explore validation of forms so that you can be sure that the data you are collecting is as you would hope for it to be.

    More Miscellaneous Articles
    More By Matt Wade

    blog comments powered by Disqus
  • MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap