Answer the question
In order to leave comments, you need to log in
How to make a regex to check for: two digits, capital letter?
I want to validate the entered password.
If checking for the presence of a single digit is simple:
addNumber: function (value) {
return /\d/.test(value)
}
Answer the question
In order to leave comments, you need to log in
capital letter:
reg = /[A-Z]/;
return reg.test(str);
reg = /[0-9]{3}/ (для трех)
return reg.test(str);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question