Take the 2-minute tour ×

I am trying to validate mobile numbers using the javascript version of Google's libphonenumber. I first check if the number is valid or not and then if its valid i check if its type is mobile. The problem that i am facing is that if a US mobile number is checked, it comes as a valid but not a mobile number. So the feedback i get is that the number is a legal US number but not a US mobile number. I know their is no way of distinguishing between the two, but in such cases shouldn't the feedback be 'cannot tell' instead of a 'No' .

I thought of posting it as an issue but then i thought i should confirm that i am right, i might be missing something. So can some one please confirm this or just guide me if i am doing something wrong.

share|improve this question
I agree, the answer should be "cannot tell", but maybe this is not an option in the library. Note that in the US numbers can be ported from mobile network to landline and vice versa, so a number that is mobile today may be a landline tomorrow. –  Aleks G Mar 8 '12 at 10:23
ok thnx a lot mate :) –  i8taken Mar 8 '12 at 10:37

2 Answers 2

This is a tricky topic. If you are serious about the distinction, you'll have to subscribe to a regularly updated database of international phone numbers, like this one (not affiliated, associated or anything, just happen to know them). With it you'll be able to associate a number(-prefix) with a carrier, which is surprisingly more varied, complex and ever-changing than you might expect.

Which is the reason why libphonenumber cannot give 100% accurate results. I don't know if it could even return "don't know" with any certainty.

share|improve this answer
got it, so means i should just put a feature request there, if they think its any good thay can provide it :) –  i8taken Mar 8 '12 at 10:39
Yeah, it's worth a try. I'm not really sure this is entirely possible though, even with the best paid-for database compiled into libphonenumber every day you will probably still have inaccurate cases. You'll have to deal with this inaccuracy either way in your app. –  deceze Mar 8 '12 at 10:51
up vote 0 down vote accepted

I know its late but if anyone comes to this question later, it was my mistake. They do have a status PNT.FIXED_LINE_OR_MOBILE for situations where they cannot decide if its a landline or mobile number.

share|improve this answer

Your Answer


