Skip to content

Conversation

@osabahat
Copy link
Collaborator

@osabahat osabahat commented Dec 6, 2024

Handles the following cases:

# Standard US numbers
("223-456-7890", "2234567890"),
("(223) 456-7890", "2234567890"),
("223 456 7890", "2234567890"),
("2234567890", "2234567890"),
# US numbers with country code
("+1 (223) 456-7890", "2234567890"),
("1-223-456-7890", "2234567890"),
("1-223-456-7890", "2234567890"),
("+12234567890", "2234567890"),
# Invalid cases
("12345", None),  # Too short
("abcdefg", None),  # Non-numeric
("", None),  # Empty input

Any phone numbers > 10 digits we just take the last 10 digits of the number to use

@osabahat osabahat linked an issue Dec 6, 2024 that may be closed by this pull request
@c-simpson c-simpson merged commit 4a34a08 into master Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sanitize phone numbers

3 participants