![]() ![]() So, without resorting to a brute-force while loop that has no upper bound, and without introducing an upper bound for such trivial problems, what better ways are there to generate valid phone numbers accepted by the validator itself? from phonenumber_field.validators import validate_international_phonenumberįrom re. ![]() For example, here is what happens when I get the call on my iPhone: When we pick up the phone call we also see the /twiml route get called via Ngrok. Go to localhost:5000/dial-phone/my-phone-number, where my-phone-number is a number in the 12023350173 E.164 format. '+1-91' # Obviously wrong, it has 911 in it Bring up your application in the web browser. Go back to the Plivo console and click on Phone Numbers on the left nav bar. > a = functools.partial(random.randint, 0, 9) Before you can receive a call using this PHLO, you have to assign it to a Plivo number. Within the project are vast lists of custom validation rules, for which naive approach like this will not be sufficient: > import functools My project uses python-phonenumbers and django-phonenumber-field for phone number validation. Not a duplicate of Making random phone number xxx-xxx-xxxx
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |