react-phone-input-2
react-phone-input-2 copied to clipboard
Not taking in valid Argentina numbers
Below is the valid Argentine mobile number:
+54 91123017883
That 9 after +54 is the prefix introduced in 2003 which isn't considered here. Reference: http://www.wtng.info/wtng-54-ar.html
Based on other repo it was formed from:- this works fine with: https://catamphetamine.gitlab.io/react-phone-number-input/ but not with: https://bl00mber.github.io/react-phone-input-2.html
It's worth considering that +54 11 23017883
is also a valid number if you're calling from within the country.
You only need the 9
when you call from another country, adding it as a local call has no practical effect. (yes, complicated country).
Most of the people living in the country ignore the fact that you have to enter 9
when calling from other countries and would be confused by the presence of the 9
in a form since they've never seen it before.
Conclusion (IMHO):
+54 91123017883
and +54 11 23017883
should be both valid.
From wikipedia:
In Argentina, area codes are two, three, or four digits long (after the initial zero). Local customer numbers are six to eight figures long
but this library accepts only 2 digit are codes so for example +54 (383) 12345678
(Catamarca area code) won't work
Did you guys founded a solution for this ?
Did someone updated the library and got it to work with the number 9? Btw, can somebody tell me if only the areas wich code has 2 digits work or all areas work even if their area as 3 or 4 digits?
Made it work by passing masks
prop, like
<ReactPhoneInput
masks={{
ar: '. .. .... ....',
}}
...
It worked for me, thank you!!