I need to validate a 1 to 25 digit number. Example: 1 should work and 1234567890123456789012345 should work too and anything in between. No characters allowed. This is an expression that worked for a 1-3 digit number for me in the past:
var number = /\d$|(\d\d$)|(\d\d\d$)/;
However, for a 1-25 digit number that would be to long of an expression to do. I have tried:
\d{1,3}/; and \d{1,}
With these two it allowed numbers mixed in with letters, for example 12w3, it did however pick up all letters like aaaa. Any ideas?