bl00mber / react-phone-input-2

:telephone_receiver: Highly customizable phone input component with auto formatting
https://bl00mber.github.io/react-phone-input-2.html
MIT License
953 stars 543 forks source link

How i can know if the number typed by user is correct depend of country? #343

Open quirozcarlos opened 3 years ago

quirozcarlos commented 3 years ago

I tested the demo, and I can type a wrong number for Venezuela, I would like to know if the number is correct/incorrect. Thanks

duranmla commented 3 years ago

Hey! Super late to the party and I just stumble with this issue. Maybe useful for someone else.

You need to use https://github.com/bl00mber/react-phone-input-2#check-validity-of-the-phone-number and based on the input it provides (country and value) you can make the validation yourself. Hopefully it helps.