Validate/restrict inputs on keypress in android


#1

Hi, all i need help regarding key events in android.these are the main problems that i am facing.

1: keypress not firing in android.
2: preventDefault not firing on keyup.
3: keydown returns first value empty.

i want to restrict input number only.
similarly i want to restrict other fields according to their validation.


#2

Using an <ion-input type="number"> is not an option?


#3

I think event micromanaging is overkill here. I recently posted this example using split two-way binding that limits to numeric input and pins to min/max ranges.


#4

i try both of these but insane the real problem is not allowing user to type alphabet inside input field.