phone icon indicating copy to clipboard operation
phone copied to clipboard

[Bug/ problem report] Brazilian numbers can also have 10 digits

Open ana-vf opened this issue 1 year ago • 3 comments

Hello, It appears that some Brazilian numbers can also have 10 digits, however the rules in phone library would only allow 11 digit numbers. as discovered here https://github.com/AfterShip/phone/blob/master/src/data/country_phone_data.ts#L278 Is this something you can adjust? Alternatively, is there a way to locally override the rules phone library is using? Thanks :)

ana-vf avatar Aug 10 '22 03:08 ana-vf

Hello, thanks for the report, however is there any reference showing that Brazillian mobile phone number got 10 digit?

Bossa573 avatar Aug 10 '22 04:08 Bossa573

hey @Bossa573 I found this Telephone numbers in Brazil We do have an example phone number that is in this format +5511-xxxx-xxxx that was failing to pass validation, however is a working number. Thanks!

ana-vf avatar Aug 10 '22 07:08 ana-vf

thanks for the reference, @ana-vf would you mind creating a PR for this?

Bossa573 avatar Aug 10 '22 07:08 Bossa573

thanks @Bossa573 here is the PR https://github.com/AfterShip/phone/pull/309

ana-vf avatar Aug 10 '22 23:08 ana-vf

thanks and it will be included in the next release

Bossa573 avatar Aug 11 '22 01:08 Bossa573