react-phone-input-2 icon indicating copy to clipboard operation
react-phone-input-2 copied to clipboard

Not taking in valid Argentina numbers

Open umakantmanu opened this issue 3 years ago • 6 comments

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

umakantmanu avatar Oct 28 '21 06:10 umakantmanu

It's worth considering that +54 11 23017883is 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.

Trisky avatar Oct 29 '21 11:10 Trisky

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

mmuszkow avatar Jan 26 '22 11:01 mmuszkow

Did you guys founded a solution for this ?

maclementED avatar Oct 13 '22 16:10 maclementED

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?

tlopesdigitalsign avatar Jan 05 '24 10:01 tlopesdigitalsign

Made it work by passing masks prop, like

<ReactPhoneInput
  masks={{
    ar: '. .. .... ....',
  }}
  ...

eugene-ivanenko avatar Jan 26 '24 08:01 eugene-ivanenko

It worked for me, thank you!!

tjalopes avatar Jan 30 '24 12:01 tjalopes