chore: all review comments
This commit is contained in:
7
src/utils/regexes/isValidPhoneNumber.tsx
Normal file
7
src/utils/regexes/isValidPhoneNumber.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import parsePhoneNumberFromString from 'libphonenumber-js';
|
||||
|
||||
export const isPhoneNumber = (code: string, phone: string) => {
|
||||
const phoneNumber = parsePhoneNumberFromString(code + phone);
|
||||
|
||||
return phoneNumber && phoneNumber.isValid();
|
||||
};
|
||||
Reference in New Issue
Block a user