Navigation Menu
Alphabetical Listing
Site Contents

Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

General

Simple telephone number validation. This script makes sure the user enters only numbers, brackets, hyphens, or spaces. A plus (+) may be entered as the first character. Just add it to your form validation routine.


Notes

Implement with onkeyup="validatephone(this);" on desired field

Add any symbols after the '@' symbol in the line of characters to block characters such as brackets

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: liveTeleNumValidation.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

5. From: suneel
Awesome code
10/12/2007 12:24:52

Thanks for sharing this.

4. From: lakshmi
thanks
09/26/2007 04:10:02

thats a nice code thanks dude.... :-)

3. From: raghunandan
08/01/2007 02:15:49

Its really helpful man... thank you..:-)
Keep going...

2. From: Reddy Prasad
Nice one
07/13/2007 00:13:20

Hi.. it is very nice man, keep it up... It helps really helps for me a lot.

Thank you,
Reddy Prasad

1. From: Mujeeb Rahman
04/02/2007 02:44:10

Great stuff,and very useful to me


Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.