I have type=number input field and I have set min and max values for it:
type=number
min
max
In some cases pattern can be used instead of min and max. It works correctly with required.
pattern
required