validate phone number based on country
parent
15e90356e7
commit
6f228a598e
|
@ -42,10 +42,11 @@ export function Step2({
|
|||
const {isMobile} = useWebMediaQueries()
|
||||
|
||||
const onPressRequest = React.useCallback(() => {
|
||||
if (
|
||||
uiState.verificationPhone.length >= 9 &&
|
||||
parsePhoneNumber(uiState.verificationPhone, uiState.phoneCountry)
|
||||
) {
|
||||
const phoneNumber = parsePhoneNumber(
|
||||
uiState.verificationPhone,
|
||||
uiState.phoneCountry,
|
||||
);
|
||||
if (phoneNumber.isValid()) {
|
||||
requestVerificationCode({uiState, uiDispatch, _})
|
||||
} else {
|
||||
uiDispatch({
|
||||
|
|
Loading…
Reference in New Issue