Results 1 to 3 of 3

Thread: How to set validation of phone numbers like design?

  1. #1
    Join Date
    Sep 2005

    How to set validation of phone numbers like design?

    How to set validation of phone numbers like design?
    Attached Images Attached Images

  2. #2
    Join Date
    Jul 2013
    Voorheesville NY USA
    If I really really had to do this, I would just use js to validate the number and re-format after the user has made his entire entry. Of course - you would then have to remove this formatting before storing it to keep it in a easily useable format in your db. I would never store a telephone number like that.

    Something like:
    <input type='text' name='telno' id='telnoid' size=10 onchange='return validateTelNo("telnoid")'>

  3. #3
    Join Date
    Mar 2007
    formatting, it looks nice but in all cases is not really necessary.

    you only need to know that all characters are numerical, allow people to format how they are used to, when you submit to a database then store the number in whatever format that floats your boat.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

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