Closed TallOrderDev closed 6 years ago
It never hit me! Though this will be serious breaking changes, I'd suggest that we have isPhoneNumber
as alias...
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 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.
'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