I am trying to write a tiny number validator, I want it to validate if the input is a number and that works. I also want to validate that the input is a number between the length of say 10 and 20, no shorter no longer. I first thought it would be as simple as /^[0-9]{10-20}$/ but apparently not. So after googling and reading around, I seem to find that, well, I can’t find the answer.
How to limit the input to a certain amount of characters with use of Regexp? Any articles on the subject is welcome as well as ideas on how to solve the puzzle.
The correct syntax is
{10,20}(with a comma).