Skip to content

Instantly share code, notes, and snippets.

@mityaua
Created October 19, 2022 14:16
Show Gist options
  • Save mityaua/ed5a8fea7e91fee91534e203c6a792a8 to your computer and use it in GitHub Desktop.
Save mityaua/ed5a8fea7e91fee91534e203c6a792a8 to your computer and use it in GitHub Desktop.
Regular expression of Ukrainian mobile number +38 (0##) ###-##-##
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