razorpay / i18nify

One stop solution for all your internationalisation needs.
https://geosmart.razorpay.com/
21 stars 10 forks source link

UK (GB) Number validation is failing #143

Open rparsh opened 6 months ago

rparsh commented 6 months ago

Bug Summary

Describe the issue encountered concisely but informative.

IsValidNumber throwing error for UK valid phone number. There seems to be an issue with the regex.

Can we update the regex based on https://stackoverflow.com/a/11518538

https://regex101.com/r/IMfzkx/1

Valid Phone number like +442071234567 showing invalid

Code Snippet / Configuration (if applicable)

Include any relevant code snippets or configuration related to the bug.

isValidPhoneNumber('2071234567', 'GB') 
Siddhant-Kashyap commented 1 month ago

This has been resolve now so we can close this !