Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,146
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts

    Validating Form Inputs

    This is intended to be a helpful reminder to web designers and programmers, as across the web I seem to encounter quite a number of forms where the validation procedures prevent it being filled in.

    First, phone numbers. Please do not restrict them to a particular format unless you do not want orders from overseas customers, and allow the ++ prefix for international dialing and the country code. As I understand it USA codes have 9 digits, but this does not apply elsewhere in the world.

    Secondly, postcodes. Again, these vary a lot from country to country. It makes no sense if only a five digit USA zip code is allowed.

    Proper names - these can include non-alpha characters such as:

    Home of 'O' Gauge
    Tom's Tool Works
    Westward Ho! Enterprises
    Smith & Jones Inc.
    J.Brown (1998) Ltd.
    100% Reliable Taxis
    The $10 Shoe Shop
    "My House Name"
    Red-Barrel Beer

    Too many forms seem to reject these non-alpha characters, which can result in a lot of customer frustration.

    I respectfully suggest that if people are too dumb to enter their names, postcodes and phone numbers correctly, then that is their problem! Excessively strict validation can drive your customers away!

    Hope this helps and is in the right forum.

    Philip M

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Very right you are, Philip. To quote a person better with words than I
    "Knowledge...is knowing how to do it. Wisdom...is knowing when to do it."
    -Author unknown
    Please folks, validate where it's necessary, and not just for the sake of validating.

    Note to self: write a "Validation Pros & Cons" snippet for fValidate website
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #3
    New Coder
    Join Date
    Nov 2002
    Location
    London, UK
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Couldn't agree more Philip.

    Note to self: write a "Validation Pros & Cons" snippet for fValidate website
    Is that a sneaky plug for fValidate again

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Adam20002
    Is that a sneaky plug for fValidate again
    ! ! ! S h h h h ! ! !

    *** Nobody noticed 'till you said something! ***


    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


  •  

    Posting Permissions

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