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

Name Convention for phone numbers #750

Closed
TallOrderDev opened this issue Nov 21, 2017 · 3 comments
Closed

Name Convention for phone numbers #750

TallOrderDev opened this issue Nov 21, 2017 · 3 comments

Comments

@TallOrderDev
Copy link

'isMobilePhone' seems like a incorrect name as it's not only checking mobile numbers. This could be confusing, and there are a few ways to determine/guess if a number is Mobile, so it indicates that it's doing something that it is not.

isPhoneNumber
isPhone
isPhoneNum

@profnandaa
Copy link
Member

It never hit me! Though this will be serious breaking changes, I'd suggest that we have isPhoneNumber as alias...

@chriso
Copy link
Collaborator

chriso commented Dec 9, 2017

The validator should only be checking whether a string is a mobile phone number. The lines are obviously blurred in some locales, and/or people have snuck in general phone validation.

This library will never have general international phone validation. It's too hard; just use libphonenumber.

For more info, see:

@chriso chriso closed this as completed Dec 9, 2017
@TallOrderDev
Copy link
Author

@chriso could you give some clarity between a mobile number and house or work number? As in the US these are all the same format so there is no checkable difference between any of the three.

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

No branches or pull requests

3 participants