fix(utils): convert phone numbers passed into validate_phone_number to strings
This commit is contained in:
parent
aca2801897
commit
c6a2e6595a
1 changed files with 3 additions and 0 deletions
|
|
@ -142,6 +142,9 @@ def validate_phone_number(phone_number, throw=False):
|
|||
if not phone_number:
|
||||
return False
|
||||
|
||||
if not isinstance(phone_number, str):
|
||||
phone_number = str(phone_number)
|
||||
|
||||
phone_number = phone_number.strip()
|
||||
match = PHONE_NUMBER_PATTERN.match(phone_number)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue