feat(phone-input): Add optional allowedCountries prop to PhoneInput - #594
Open
irisrossellvitorica wants to merge 1 commit into
Conversation
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>
irisrossellvitorica
requested review from
AlanFnz,
Amin52J,
Mukesh-FN,
chrisrolfe198 and
lizzielerwill-ctrl
as code owners
August 21, 2026 10:12
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.