www.webdeveloper.com
Results 1 to 2 of 2

Thread: Validating Fields from a HTML form using ASP before writing form data to a database

  1. #1
    Join Date
    Oct 2005
    Posts
    39

    Validating Fields from a HTML form using ASP before writing form data to a database

    Can anyone give me any guidelines on validating data in a HTML form?

    I need to validate that the fields are not empty, that certain fields only contain numbers, cetrtain fields only contain letters, and that one field only contains a date value.

    I want to do this in ASP befor the information from the form is used to create an SQL statment which is going to be used to insert the data into an access database.

  2. #2
    Join Date
    Jan 2003
    Location
    USA
    Posts
    688
    Here are some interesting server-side validation links:

    Server-Side Form Validation by Dianna Leech
    http://www.4guysfromrolla.com/webtech/120199-1.shtml

    An Email Validation Routine by Joćo Vieira
    http://www.4guysfromrolla.com/webtech/041199-1.shtml
    Somewhat shorter.

    An Email Validation Script by Ben Durbin
    http://www.4guysfromrolla.com/webtech/051999-1.shtml
    Longer.

    Form Handler: Some light form validation and error notification.
    http://www.asp101.com/samples/form_handler.asp
    Uses function to loop thru all fields in a form.

    And here are some interesting client-side validation links:

    Javascript Field Validations -- Client Side Scripting by Nannette Thacker
    http://www.shiningstar.net/articles/...ions.asp?ID=AW

    Form Validation Using Javascript
    http://www.4guysfromrolla.com/webtech/091998-1.shtml
    Good tips such as saving JavaScript functions in a file called DataValidation.js and including this in pages that need this.
    JavaScript functions.

    WebDaily: Your daily source for Web Technology Tips and Tricks!
    http://www.4guysfromrolla.com/webtech/102798-1.shtml
    Just checks if fields filled in.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles