Good day,
I'm trying to get the length of an value interred into a input field. The value entered needs to be 13 characters long, no less no more. And must be numerical numbers.
Here is my JS code:
value = '8312258066038';
re = new RegExp('^\d{13}$');
alert(re.match(value));
The answer is supposed to be true if the value is 13 characters.
TypeError: re.match is not a function. I recommend to read developer.mozilla.org/en-US/docs/JavaScript/Guide/….