Created
October 19, 2022 14:16
-
-
Save mityaua/ed5a8fea7e91fee91534e203c6a792a8 to your computer and use it in GitHub Desktop.
Regular expression of Ukrainian mobile number +38 (0##) ###-##-##
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const validatePhoneNumber = (phone: string): boolean => { | |
const regExp = /\+38\s\(0(39|50|63|66|67|68|70|73|90|91|92|93|94|95|96|97|98|99)\)\s[\d]{3}-[\d]{2}-[\d]{2}/g; | |
return regExp.test(phone); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment