javascript - input keyboard type prevent html5 cordova -


i create html input box 4 digit number, following restrictions

  1. even user tries press other numbers, should not appear on screen
  2. if more 4 numbers pressed, 5th number should not appear on screen

how achieve in html5 hybrid cordova app while running in mobile device

i tried

<input type="number" maxlength="4" size="4" max="999"/> 

but in google chrome mobile device preview, allows number of characters pressed

is default behaviour of webkit?

should post submit validation , throw message?


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -