typesnippet / antd-phone-input

Advanced, highly customizable phone input component for Ant Design.
https://playground.typesnippet.org/antd-phone-input-5.x/
MIT License
60 stars 11 forks source link

🐛 Bug Report - Mozambique digits #42

Closed Elson-Timana closed 1 year ago

Elson-Timana commented 1 year ago

The number of Mozambique has in total of 9 digits after the prefix 258, however, the antd-phone-input only accept 8 digits.

ArtyomVancyan commented 1 year ago

According to Wikipedia, 8 and 9 are both valid length phone numbers for Mozambique, and only 8 is considered in validations.json. Thank you, @Elson-Timana, for the report. This will be fixed in the next release

Elson-Timana commented 1 year ago

Thanks, but i cannot find this file in my project, as you can see in image below.

image

ArtyomVancyan commented 1 year ago

It was not supposed to be in your project. The file is a part of the antd-phone-input, and you use it as a dependency.

Elson-Timana commented 1 year ago

Thanks, then how can i resolve this issue? it's important to my project because I'm from Mozambique

ArtyomVancyan commented 1 year ago

If you want to contribute, you can clone this repository, open the src/legacy/validations.json, and add another possible length to the phoneNumber property in the list. You should change the mz only. After you make the changes, you should build and install the local build to verify the validity. If all looks okay, open a pull request through GitHub and I will review it.

Or just wait for 1-2 days, I will fix this with upcoming optimizations and you will use the fresh release.

Elson-Timana commented 1 year ago

Sounds great, I think I can wait.

ArtyomVancyan commented 1 year ago

Hi @Elson-Timana, the new version is available now. Please enjoy it :)