-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
32 lines (27 loc) · 1.14 KB
/
Copy pathscript.js
File metadata and controls
32 lines (27 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
let userInput = document.getElementById('userPassword');
let theReturn = document.getElementById('passwordCheck');
let element1 = document.getElementById('ele1');
let element2 = document.getElementById('ele2');
setInterval(
function passwordQuality(){
let userPassword = userInput.value.trim();
if(userPassword.includes(" ", ">", "<", "*", "+", "-", "/", ",", '~','`','|', '/', '{', '}', '(', ')' )){
theReturn.textContent = "This is an Invalid Password"
theReturn.classList.add('bad')
}
else if(userPassword.includes("@", "!", "$", "&", "_") || userPassword.length > 100){
theReturn.textContent = "Great Password";
theReturn.classList.add('gg')
}
else if(userPassword.includes(".", 1,2,3,4,5,6,7,8,9)){
theReturn.textContent = "Need to be Better";
theReturn.classList.add('mid')
}
else if(userPassword.length > 5) {
theReturn.textContent = "Weak Password";
theReturn.classList.add('bad')
} else if(userPassword == ''){
theReturn.textContent = '';
}
}, 500
)