How to check If a Tel: area code is correct using jquery?
Posted
by streetparade
on Stack Overflow
See other posts from Stack Overflow
or by streetparade
Published on 2010-03-26T14:35:29Z
Indexed on
2010/03/26
15:03 UTC
Read the original article
Hit count: 285
Hy I need to check if the given phone area code is correct. i created a input field, user can insert a tel area code like 0044 oder 0090 and so on. I restricted the input field to 4 chars. I need to check after the 4 chars are entered if the area code is correct.
What it should do.
After entering 4 number, the script should check the following things.
Does the entered number equals something like "00{number 2 digit only}"
if it doesnt alert("please enter correct tel areacode");
I hope i could explain my problem clear. How can i do it with javascript or jquery?
© Stack Overflow or respective owner