Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morocco phone pattern is wrong #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

geiszla
Copy link

@geiszla geiszla commented Mar 16, 2022

The pattern given for Morocco is +212-......... (notice that the phone code is already in the pattern, while in, e.g. UK pattern, it is given as +.. .... ...... without the phone code). This will make formatNumber return the wrong phone number (e.g. +212-212 when only entering +212) and therefore will make inputting certain phone numbers impossible.

The fix is simply to remove the numbers from the pattern (change it to +...-.........).

@v1b3m
Copy link

v1b3m commented Jul 13, 2022

@geiszla Thanks for this, I had created a fork to work on this then I saw you had a fix already 😄

@v1b3m
Copy link

v1b3m commented Jul 13, 2022

Quick question @geiszla Did you have to install the peerDependencies before building the package again? If not, what steps did you follow?

@geiszla
Copy link
Author

geiszla commented Jul 13, 2022

Quick question @geiszla Did you have to install the peerDependencies before building the package again? If not, what steps did you follow?

Tbh because this was just a string change, I search and replaced every occurrence, didn't build again 😅. However, we are not using this fix, as this PR didn't get any reaction (and just overall this package is not maintained anymore), we switched to react-phone-number-input.

@v1b3m
Copy link

v1b3m commented Jul 15, 2022

Tbh because this was just a string change, I search and replaced every occurrence, didn't build again 😅. However, we are not using this fix, as this PR didn't get any reaction (and just overall this package is not maintained anymore), we switched to react-phone-number-input.

@geiszla Totally makes sense, building this is another hustle 😅 .
Thanks for the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants