Show error message when form validation fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mirianCalin
    New Member
    • Feb 2008
    • 35

    Show error message when form validation fails

    hi.. im doing a site..
    i have this registration form where the user must enter some information like
    name, phone_number, age, etc..
    an error message should appear if

    #1: there is an empty field..
    error message = "Please Complete the Form"
    #2: a number was inputted in the name field..
    error message = "You have entered a number"
    #3: a letter was inputted in the age or phone_number field..
    error message = "You have entered a letter"

    i am not familiar with scripting but since it is needed in the site, i have no choice.. thanks for your future replies..
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Originally posted by mirianCalin
    hi.. im doing a site..
    i have this registration form where the user must enter some information like
    name, phone_number, age, etc..
    an error message should appear if

    #1: there is an empty field..
    error message = "Please Complete the Form"
    #2: a number was inputted in the name field..
    error message = "You have entered a number"
    #3: a letter was inputted in the age or phone_number field..
    error message = "You have entered a letter"

    i am not familiar with scripting but since it is needed in the site, i have no choice.. thanks for your future replies..
    You need this .. JavaScript form validation

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Also check out the form validation links in the Off-site Links (sticky) thread.

      Comment

      Working...