Input type number min, max attribute validation

By default, input type=number provides a min and max attributes but it still allows you to type the number greater than the max value, and value lower than the min value. It is only validated when the form is submitted.

To prevent the user from typing the value greater than the max value and lower than the minimum value, you just need to add the following minmax-validation class to your input type:


min = 50, max = 100