We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54aff9c commit 1370358Copy full SHA for 1370358
1 file changed
u/signup.html
@@ -64,7 +64,14 @@
64
}
65
66
if (!/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$/.test(password)) {
67
- statusElement.textContent = "Password doesn't meet requirements!";
+ problms = [];
68
+ if (password.length < 8) problms.push("Password must be at least 8 characters long.");
69
+ if (!/^(?=.*[a-z])$/.test(password)) problms.push("Password must contain a lowercase letter.");
70
+ if (!/^(?=.*[A-Z])$/.test(password)) problms.push("Password must contain an UPPERCASE letter.");
71
+ if (!/^(?=.*\d)$/.test(password)) problms.push("Password must contain a numb3r.");
72
+
73
+ statusElement.textContent = "Password doesn't meet requirements!<br>"+problms.join("<br>");
74
75
document.getElementById("password").style.borderColor = "red";
76
return;
77
0 commit comments