I made a table where input is integer, but somehow I am still able to pass any text.
<tr>
<td>number: </td>
<td><input type="integer" name="number" value=""/></td>
</tr>
is the type="integer" correct?
In short, integer is not the correct type - what you seek is number
<input type='number' />
Additional attributes for this type of input are possible, including:
min: the lowest value the input will allowmax: the highest value the input will allowstep: the incremental value that the up/down selectors will increment the current value byMore information & example usage from MDN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With