473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to allow spaces in between phone and code number?

Hi to All,

I am using general javascript function isNAN to validate whether entered input is number or not it is doing ok. But it should take space in between code number and phone number.

for Example: now it it is taking 078245378 (not allowing spaces, This is existing validation)

but it should allow space like 078 245378.


Please can any one help me how to validate this(i mean how to allow spaces in between code and phone number.

Thanks
Ram
Apr 11 '08 #1
1 2085
mrhoo
428 256MB
it should allow space like 078 245378
Your example was not a valid us phone number, and would fail this test:

var okphonenum=/^\d{3} *\d{7}$/.test(inputvalue)
Apr 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: iStrain | last post by:
Hiya. I'm _sure_ this is an FAQ, but Googling hasn't produced the answer in a way I can make sense out of. I know I should get this, but so far no way... I'm creating tables and doing queries in...
4
by: Mike | last post by:
Hi! I'm putting together a data entry form. One of the entries will be a telephone number. I've been directed to implement this by using three separate fields -- the first being for area code,...
2
by: deko | last post by:
The below code dials a phone number using C:\Program Files\Windows NT\dialer.exe. The problem is that dialing rules are ignored. MS Knowledge Base Article 266253 suggests that entering the phone...
5
by: Marco Gallo | last post by:
I've been trying to get rid of extra spaces in a table that I created with addresses in it. For instance in a field called TEST, I got the following address: " 1 main st Apt A "...
1
by: Arjen | last post by:
Hello, In code view I use a tab as mark-up character. When I run my web application I can see the tabs with the source viewer in my browser. Is there a way to remove the tabs, extra spaces...
1
by: qwerty | last post by:
My end goal is to have a script that takes user input from one pageA, submits to pageB which then displays the parameter values entered on PageA. My problem is that the values are being displayed...
12
by: Wayne | last post by:
I have been given the task of rewriting a database that seems as though it has been written by someone with a very basic understanding of Access. Many of the object names and field names in tables...
0
by: padmagvs | last post by:
I have a wsdl something like this <?xml version="1.0" ?> <definitions targetNamespace="http://abc.com/namespace/wsif/samples/abc" xmlns:tns="http://abc.com/namespace/wsif/samples/abc"...
7
by: shapper | last post by:
Hello, I need to format phone numbers for easier reading: 961239070 becomes 96 123 90 70 So a space is introduced always on the places of the example. How can I do this? And can I use a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.