Skip to content

fix(phone): handle autofill-injected country code prefix in cleanNumber#896

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/phone-autofill-country-code
Jun 13, 2026
Merged

fix(phone): handle autofill-injected country code prefix in cleanNumber#896
bmc08gt merged 1 commit into
code/cashfrom
fix/phone-autofill-country-code

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

When Android autofill suggests a phone number with a leading + (e.g. +12025551234), cleanNumber would blindly prepend the locale area code, producing a malformed string like 1+12025551234 that caused a NumberParseException in libphonenumber. Now detects the + prefix and passes the number directly to makeE164 without prepending.

When Android autofill suggests a phone number with a leading + (e.g.
+12025551234), cleanNumber would blindly prepend the locale area
code, producing a malformed string like 1+12025551234 that caused a
NumberParseException in libphonenumber. Now detects the + prefix and
passes the number directly to makeE164 without prepending.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt self-assigned this Jun 13, 2026
@bmc08gt bmc08gt merged commit 98454a5 into code/cash Jun 13, 2026
3 checks passed
@github-actions github-actions Bot added the type: fix Bug fix label Jun 13, 2026
@bmc08gt bmc08gt deleted the fix/phone-autofill-country-code branch June 13, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant