How to make type="number" to positive numbers only
Add a min
attribute
<input type="number" min="0">
I have found another solution to prevent negative number.
<input type="number" name="test_name" min="0" oninput="validity.valid||(value='');">