title: How to check whether the entered mobile is landline or mobile using PhoneFormat.js?
body: <p>This is my example form. I just have take one text box, where I will enter mobile number and I will choose the country from the drop-box menu, for validating the mobile number with country I have used the <a href="http://www.phoneformat.com/" rel="nofollow">http://www.phoneformat.com/</a>. Here they have given one method <code>isValidNumber(phno, country)</code> which validate the phone number with the country (both landline number and mobile number).</p>
  
  <p>My requirement is I need to allow only mobile number, for that I have used the <code>getNumberType(phno)</code>, but it is not giving any results, can anyone help me how to check whether the entered number is landline or mobile number?</p>
  
  <pre><code>&lt;form name="fm" method="POST"&gt;
  
  &lt;input type="text" name="phno" id="phno"&gt; &lt;br&gt;
  &lt;select id="Ultra"&gt; 
       &lt;option value="0"&gt;Select&lt;/option&gt;
       &lt;option value="IN"&gt;India&lt;/option&gt;
       &lt;option value="AU"&gt;Australia&lt;/option&gt;
       &lt;option value="CN"&gt;China&lt;/option&gt;
       &lt;option value="US"&gt; America &lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;&lt;br&gt;
  
    &lt;input type="submit" value="check" onclick="run()"&gt;
  
  &lt;/form&gt;
  
  
  &lt;script&gt;
  function run()
  {
  
  var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
  
  var phno = document.getElementById("phno").value;
  alert('Phone number is '+phno);
  
   var res=isValidNumber(phno, country);
  
  var country=document.getElementById("Ultra").value;
  
  alert('Country code is '+country);
  
  try{
  
      var res1=getNumberType(phno);
  
      alert('type of phone number is '+res1);
  
      }catch(e){
  
      alert(e);
  }
  
  
  
  alert("validation result is "+res);
  
  }
  
  &lt;/script&gt;
  </code></pre>