Multiple Min and Max value for textbox

Viewed 1217

I have a working code for entering valid minimum and maximum value in text box by using below code:

<input type="number" name="quantity" min="1" max="5">

But how about if I have multiple ranges allowed? For example: In my text box, numbers from 1 to 5 and 10 to 15 is allowed, so numbers from 6-9 and 16 & up is not allowed. How to do this using javascript/jquery or angularjs?

5 Answers
Related