Skip to content

Commit

Permalink
fix: tighten phone number validation
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMuzyk committed Nov 6, 2024
1 parent 370b0b3 commit ce274cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ValidationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ function isValidPhoneInternational(phoneNumber: string): boolean {
const phoneNumberWithCountryCode = LoginUtils.appendCountryCode(phoneNumber);
const parsedPhoneNumber = parsePhoneNumber(phoneNumberWithCountryCode);

return Str.isValidE164Phone(parsedPhoneNumber.number?.e164 ?? '');
return parsedPhoneNumber.possible && Str.isValidE164Phone(parsedPhoneNumber.number?.e164 ?? '');
}

/**
Expand Down

0 comments on commit ce274cb

Please sign in to comment.