jquery - phone number validation with space -


this question has answer here:

i'm new jquery, want regular expression validating phone numbers in jquery 1 of text fields.

i want show phone numbers max length of 12 , allow spaces; pattern is:

011 233 455 345 or 1111 3333 3333

i have found validation purpose, did not find exact validation.

try regex

1) /^\d{4} \d{4} \d{4}$/ 1111 1111 1111

2) /^\d{3} \d{3} \d{3} \d{3}$/ 111 111 111 111

codepad 1

codepad 2


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -