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

🪄 Enhancement - Improve the phone number length validation #46

Closed ArtyomVancyan closed 1 year ago

ArtyomVancyan commented 1 year ago

Summary

Currently, the phone number length validation may work incorrectly for those countries that have multiple variations of combinations of areaCode and phoneNumber defined in validations.json. The list of mobile telephone prefixes by countries are defined on this Wikipedia page.

ArtyomVancyan commented 1 year ago

The main goal of this issue is done - validation rules are represented as regular expressions. But there was noticed another issue, some countries have area codes of different lengths, and for those should be used different input masks or rather, dynamic masks. So, this issue will be continued in #53.