2

Validate UAE mobile number using js regex. Mobile No- +971 XXXXXXXXX (+971 and 9 digits after it.)

asked Dec 27, 2021 at 11:04

1 Answer 1

2
 The snippet below works for me:
 let mystring = '+971333344550';
 let reg = /\+971([\d]{9})/;
 let matches = mystring.match(reg);
 if (matches.length>0) {
 console.log('the number if valid');
 }
answered Dec 27, 2021 at 12:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.