Skip to content

🪄 Enhancement - Disable area code for specific country #96

Discussion options

You must be logged in to vote

The example you have provided is achievable. It is enough to define a new country entity in the countries.json list that will use a different input mask for certain types of dial codes. The current list of country entities includes only the general masks and is based on Google's libphonenumber, which is checked for updates weekly. I recommend you to fork the react-phone-hooks, make your changes in the countries.json (use development application for testing the result) and open a pull-request. I will review and release the changes so you can use it for your needs. This is an example of one entity that makes it possible to have area codes of different lengths for the same country.

[
  "ch",
  

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@shaiju-tte
Comment options

@ArtyomVancyan
Comment options

@MattiaDellOca
Comment options

@ArtyomVancyan
Comment options

Answer selected by MattiaDellOca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
3 participants
Converted from issue

This discussion was converted from issue #95 on June 12, 2024 09:08.