Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanitize numbers #631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

sanitize numbers #631

wants to merge 1 commit into from

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
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
1 participant