Skip to content

[Due for payment 2026-06-18] [$250] Canadian phone numbers rejected in deposit-only bank account setup #91269

Description

@MelvinBot

Canadian users are unable to add a deposit-only personal bank account because the phone number validation requires a US phone number. The form silently rejects valid Canadian phone numbers at the client-side validation step, preventing the AddPersonalBankAccount API call from ever being made.

Slack thread: https://expensify.slack.com/archives/D0AGYJN9H47/p1778253602744309

Current behavior

In PhoneNumberStep.tsx:39, the phone validation checks both isValidPhoneNumber() AND isValidUSPhone():

if (!isValidPhoneNumber(phoneNumberWithCountryCode) || !isValidUSPhone(e164FormattedPhoneNumber)) {
    errors.phoneNumber = translate('common.error.phoneNumber');
}

isValidUSPhone() only accepts numbers with region codes: US, PR, GU, VI, AS, MP. Canadian numbers (+1 with CA region code) are rejected even though Canada shares the +1 country calling code.

Expected behavior

Canadian phone numbers should be accepted in the deposit-only bank account setup flow (at minimum). The file is under InternationalDepositAccount/, which implies international support was intended.

Origin

This US-only phone validation was introduced in PR #75179 ("Change for personal bank account setup") by TaduJR on 2025-11-14.


Proposal

What is the root cause of that problem?

The isValidUSPhone() check in PhoneNumberStep.tsx uses parsePhoneNumber and compares the resolved regionCode against a hardcoded list of US territories (US, PR, GU, VI, AS, MP). Canada has its own region code CA despite sharing the +1 calling code with the US, so Canadian numbers are rejected.

What changes do you think we should make in order to solve the problem?

Add CA to the accepted region codes in the validation for the InternationalDepositAccount phone number step. Specifically:

  1. In PhoneNumberStep.tsx:39, replace the isValidUSPhone() call with a new validation function (e.g., isValidNANPPhone()) that accepts both US territory AND Canadian region codes — or simply add CA to the validUSRegionCodes array in ValidationUtils.ts:289.

The safer approach is to create a separate function or add a parameter to isValidUSPhone rather than modifying its existing behavior, since other callers may intentionally require US-only validation.

What alternative solutions did you explore?

  • Removing the isValidUSPhone check entirely and relying only on isValidPhoneNumber() — this would accept any international phone, which may be too permissive if the backend requires NANP numbers.
  • Adding a separate isValidCanadianPhone() check — unnecessary since the real fix is just expanding the accepted region codes for this specific flow.

Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @Ollyws

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions