If you want an input in your form that you will only take the number in that input, no alphabet or any symbol, you can use it.

oninput="this.value = !!this.value && Math.abs(this.value) >= 0 ? Math.abs(this.value) : null"

This code should be placed on your input, which will only take the number value in the input.

It would look like something like that.

<input type="number" id="numberField" name="numberField" value="" oninput="this.value = !!this.value && Math.abs(this.value) >= 0 ? Math.abs(this.value) : null">