title: 4 digit password PIN validation for input filed in AngularJs Cordova android applicaiton
body: <p>I am creating a Cordova application for android using AngularJs. I have an enter PIN page in my app. I need to add following validations for my input filed:</p>
  
  <ol>
  <li>Input should be a number.(Need to show number keyboard).</li>
  <li>Max length should be 4.</li>
  <li>Field type should be password.</li>
  </ol>
  
  <p>I tried <code>&lt;input type="password" maxLength="4" inputmode="numeric" pattern="[0-9]*"/&gt;</code></p>
  
  <p>In above code max length validation is working and got input filed as password. But numeric keyboard or number validation not worked for me.</p>
  
  <p>Then I tried <code>&lt;input type="number" min=1000 max="9999"/&gt;</code></p>
  
  <p>In above code 4 digit validation is working and got numeric keyboard. But the values are not protected as password.</p>
  
  <p>I need this solution in android. Can you please give me a solution.</p>
  
  <p>Thanks</p>