I need to validate some user input, to ensure a number entered is in the range of 1-99 inclusive. These must be whole (Integer) values
Preceeding 0 is permitted, but opt
Just do:
^([0]?[1-9]{1,2})$
The range will be set from 0 to 9 and the {1,2} means min digits = 1 and max digits = 2.
0
9
{1,2}
It will accept, for example: 0, 00, 01, 11, 45, 99, etc... It will not accept, for example: 000, 1.2, 5,4, 3490, etc...
0, 00, 01, 11, 45, 99,
000, 1.2, 5,4, 3490,