Is there an easy way to check if a user phone number, country code has been entered and check the number is correct? I do not use any specific formats, the number itself should be only digits, no ('s, - etc. Is this confirmation possible without user request for the country? The trick is that I want to work with all worlds of numbers by to the whole world.
I think this cannot be done with regex (a bit distorted and many things found, but not for this problem). Is there a library for this? I am using python.
Or maybe it would be more appropriate to apply the format, for example. X-YYYYYYYY ... where is X the country code or something like that?
source
share