How to make type=”number” to positive numbers only
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How to make type=”number” to positive numbers only
Add a
min
attributeI have found another solution to prevent negative number.
It depends on how precise you want to be. It you want to accept only integers, than:
If you want floats with, for example, two digits after decimal point: