Skip to content

Conversation

@shaeespring
Copy link
Contributor

@shaeespring shaeespring commented Oct 18, 2025

Use regex to remove strings from a phone number and don't save the phone number if it's less than 9 digits or greater than 15

Copy link

@costowell costowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good

Some things you can ignore if you don't care:
I don't think its necessary to accommodate anything that isn't a 10 digit number (123-456-7890). Only reason why I mention that is because it'd be nice to format the phone number nicely after removing all the junk from it (i.e. add the dashes back). Completely up to you though, I think its doing fine as is.

@shaeespring
Copy link
Contributor Author

Overall, looks good

Some things you can ignore if you don't care: I don't think its necessary to accommodate anything that isn't a 10 digit number (123-456-7890). Only reason why I mention that is because it'd be nice to format the phone number nicely after removing all the junk from it (i.e. add the dashes back). Completely up to you though, I think its doing fine as is.

I did this to handle international phone numbers. Though it's not likely we'll ever run into this issue, I'd be sad if we ever did

@shaeespring shaeespring merged commit 2b43355 into ComputerScienceHouse:main Dec 25, 2025
@shaeespring shaeespring deleted the phone-number-fix branch December 25, 2025 22:08
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.

2 participants