How do I make an input box accept numbers only?

It does if I were coding in html.

It’s alright, I wrote a function to check the input for numbers only.