Here we are allowing only decimal and integers but not any other symbol. Use of regular expressions with the pattern attribute can help us keep the valid input more constrained.. The default UI for number inputs looks something like this in all desktop browsers. The defines a field for entering a number.. Use the following attributes to specify restrictions: max - specifies the maximum value allowed; min - specifies the minimum value allowed; step - specifies the legal number intervals; value - Specifies the default value; Tip: Always add the