if(/\d/.test(str) && !/\d.*\d/.test(str)) {
// Exactly one digit
}
7
solved Need javascript validation for one, and only one, numeric in password [closed]
if(/\d/.test(str) && !/\d.*\d/.test(str)) {
// Exactly one digit
}
7
solved Need javascript validation for one, and only one, numeric in password [closed]