How can I make a regular expression to validate that in the textbox I enter a maximum of 19 digits and a minimum of 15?
what I have is this ER but I think it's wrong
var expreg = /^([0-9])*{0,25}$/;
How can I make a regular expression to validate that in the textbox I enter a maximum of 19 digits and a minimum of 15?
what I have is this ER but I think it's wrong
var expreg = /^([0-9])*{0,25}$/;
Your Expression is wrong in the
*
.So your expression should look like this:
Which does
*
taking no value to infinity, so if you want a minimum and a maximum you specify it in{min,max}
I leave you this regexpal website for validation of regular expressions and this other more complete regex101 website that @DanielFaro commented on.