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

Argentinian number validation fails for numbers with 11 digits #167

Open
smet4ik opened this issue Mar 6, 2024 · 3 comments
Open

Argentinian number validation fails for numbers with 11 digits #167

smet4ik opened this issue Mar 6, 2024 · 3 comments

Comments

@smet4ik
Copy link

smet4ik commented Mar 6, 2024

Describe the bug
The current phone number validation for Argentina only supports 10 digits after the country code (54), as defined by the mask ['Argentina', 'ar', '54', '(..) ........', 0]. However, Argentinian mobile numbers, especially when dialed from abroad, include an additional "9" between the country code and the city code, leading to numbers having 11 digits post-country code. This is not accommodated by the current validation, causing issues for users with such numbers.

Examples of Argentinian Numbers Not Supported:

54 9 11 xxxx xxxx (Buenos Aires)
54 9 xxx xxx xxxx (Larger cities)
54 9 xxxx xx xxxx (Smaller cities)

To Reproduce

  1. Select 'Argentina' from the country options.
  2. Try to enter an Argentinian phone number with 11 digits (e.g., 54 9 11 xxxx xxxx for Buenos Aires).
  3. Notice that the input field restricts the entry to only 10 digits

Expected behavior
The phone number validation for Argentina should support both 10-digit and 11-digit numbers after the country code to accommodate the current format of mobile numbers.

Question
Is there a workaround or a method to disable the length check in usePhoneInput for Argentinian numbers? Many of our users in Argentina have phone numbers that do not match the current validation rule

@racknoris
Copy link

@smet4ik Were you able to find a fix/workaround for this?

@RafaelGCruvinel
Copy link

We have the same issue here! We created a fork only to solve internally..

@evertoont
Copy link

Same problem here, did you find any solution that isn't forking the project?

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

No branches or pull requests

4 participants