Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js regex validate phone number

My regex of choice is:

/^[+]?[(]?[0-9]{3}[)]?[-s.]?[0-9]{3}[-s.]?[0-9]{4,6}$/im
Valid formats:

(123) 456-7890
(123)456-7890
123-456-7890
123.456.7890
1234567890
+31636363634
075-63546725
Comment

phone number validation regex javascript

// regex to match phone numbers entered with delimiters (spaces, dots, brackets, etc.)

/^+?d{1,4}?[-.s]?(?d{1,3}?)?[-.s]?d{1,4}[-.s]?d{1,4}[-.s]?d{1,9}$/
Comment

regex to check the phone number javascript

//To check that the phone number is of 10 digits
let regex=/^[0-9]{10}$/;
Comment

javascript regex check phone number

let pattern = /^[62|0]+d{10}/gi
let phone = '087887242822'
console.log(pattern.test(phone))
Comment

how to validate phone number regex javascript

/^d{3}(-|s)d{3}(-|s)d{4}$|^d{10}$|^1sd{3}(-|s)d{3}(-|s)d{4}$|^(1s?)?(d{3})(s|-)?d{3}-d{4}$/
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to loop through something in node.js 
Javascript :: async javascript 
Javascript :: getFullYear within moment in angular 
Javascript :: how to get sum array in javascript 
Javascript :: reload datatable 
Javascript :: cookie options 
Javascript :: typescript interface with unknown keys 
Javascript :: javascript default parameters 
Javascript :: js get all dublicates indexes in array 
Javascript :: javascript split string by multiple characters 
Javascript :: jquery preload images 
Javascript :: How to get the background image URL of an element using jQuery 
Javascript :: how to find duplicate values in an array javascript 
Javascript :: come andare a capo su javascript 
Javascript :: apps script toast 
Javascript :: A simple static file server built with Node.js 
Javascript :: callback hell javascript 
Javascript :: sentry ignoreerrors 
Javascript :: javascript indentation 
Javascript :: limit html input to two decimal places 
Javascript :: react-native build debug apk 
Javascript :: sum of array of number 
Javascript :: how to display image before upload in jhtml 
Javascript :: xpath nodejs 
Javascript :: randint js 
Javascript :: discord.js start 
Javascript :: declare an array nodejs 
Javascript :: how to kill all node processes 
Javascript :: react native passing params to nested navigators 
Javascript :: angular remove index of array 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =