Skip to content

feat(phone-input): Add optional allowedCountries prop to PhoneInput - #594

Open
irisrossellvitorica wants to merge 1 commit into
freenowtech:mainfrom
irisrossellvitorica:SUP-57083/allow-to-restrict-countries-in-phone-input
Open

feat(phone-input): Add optional allowedCountries prop to PhoneInput#594
irisrossellvitorica wants to merge 1 commit into
freenowtech:mainfrom
irisrossellvitorica:SUP-57083/allow-to-restrict-countries-in-phone-input

Conversation

@irisrossellvitorica

Copy link
Copy Markdown
Contributor

What

This MR adds an optional prop to PhoneInput to only display the list of phone numbers provided, in case the prop is missing, display all countries as usual.

Why

Lately we're having a lot of bot triggered SMS fraud attempts where bots try to register in-mass using non-European phone numbers. Registering accounts with non-European phone numbers to trigger billable SMS events, then they also use the trigger via password reset.

We are trying to mitigate this by restricting registration to non-European phone numbers. Both the registration phone code picker and the password reset one use wave's PhoneInput component.

Lets consumers restrict the country dropdown to a fixed allowlist of
ISO codes. Optional and backward compatible: when omitted, all
countries render as before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@freenow/wave@594

commit: 6b8e264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant