feat(phone-input): Add optional allowedCountries prop to PhoneInput - #594
Merged
irisrossellvitorica merged 2 commits intoAug 25, 2026
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: |
AlanFnz
reviewed
Aug 24, 2026
Member
|
Should we update the stories in order to cover this new prop? :) |
AlanFnz
approved these changes
Aug 24, 2026
Contributor
|
🎉 This PR is included in version 2.64.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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 PR 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 register in-mass using non-European phone numbers. Then they ask for a password reset, tiggering billable SMS sending which, being phone numbers outside of Europe, are costing a significant amount of money.
We are trying to mitigate this by only allowing registration and password resetting to European phone numbers. Both the web-registration countrycode picker and the password-reset one use wave's PhoneInput component.