Merge pull request #33437 from vehbiu/develop

fix(utils): convert phone numbers passed into validate_phone_number to strings
This commit is contained in:
Akhil Narang 2025-07-28 15:43:37 +05:30 committed by GitHub
commit 3c4dc61b7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)