I can\'t find the right regex pattern for this, even though there are a lot of questions in this kind.
I dont want the user to be able to type or input
It is best to use following in input field, it will stop you to enter any other character except whole numbers.
Only whole number will be accepted.
onkeypress="return (event.charCode == 8 || event.charCode == 0) ? null : event.charCode >= 48 && event.charCode <= 57"
See demo