Answers for "phone number validation with country code in javascript"

9

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
Posted by: Guest on February-07-2020
0

mobile number validation in javascript with country code

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

//Valid Phone Numbers :
(123) 456-7890
(123)456-7890
123-456-7890
123.456.7890
1234567890
+31636363634
075-63546725
Posted by: Guest on July-30-2021
0

validate country wise phone code javascript

country_codes=['91-', 'UK-44-', 'SZ-268-22']
phone="91-123456789";

is_valid_number = country_codes.some(elem => phone.match('^' + elem));
console.log(is_valid_number );
Posted by: Guest on August-02-2021

Code answers related to "phone number validation with country code in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language