html
html
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
<!-- Created by VS Creation🤍 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Password Validation</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
</head>
<body>
<div class='outside_main'>
<div class="main">
<h2>Password Validation</h2>
<div class="input_div">
<input type="password" id="passwordInput" onkeyup="validatePassword()">
<span class="material-symbols-outlined eye" id="open_eye" onclick="openEye()">
visibility
</span>
<span class="material-symbols-outlined eye" id="close_eye" onclick="closeEye()">
visibility_off
</span>
</div>
<div class="checkout_div">
<div class="check_div">
<span class="material-symbols-outlined check_icon check" id="lowerCaseCheck">
check
Enter to Rename, Shift+Enter to Preview
css
css
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
/* Created by VS Creation🤍 */
* {
margin: 0;
padding: 0;
box-sizing: border;
}
h2 {
margin-bottom: 30px;
font-family: sans-serif;
letter-spacing: 2px;
font-size: 26px;
text-align: center;
font-weight: 500;
}
.main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 90vh;
padding: 14px;
}
.input_div {
padding-right: 10px;
Enter to Rename, Shift+Enter to Preview
js
js
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
// Created by VS Creation🤍
alert("please follow me");
function openEye() {
document.getElementById("close_eye").style.display = "block";
document.getElementById("open_eye").style.display = "none";
document.getElementById("passwordInput").type = "text";
}
function closeEye() {
document.getElementById("close_eye").style.display = "none";
document.getElementById("open_eye").style.display = "block";
document.getElementById("passwordInput").type = "password";
}
function validatePassword() {
const password = document.getElementById("passwordInput").value;
if (/[a-z]/.test(password)) {
document.getElementById("lowerCaseCheck").style.display = "flex";
document.getElementById("lowerCaseRadio").style.display = "none";
} else {
document.getElementById("lowerCaseCheck").style.display = "none";
document.getElementById("lowerCaseRadio").style.display = "block";
}
if (/[A-Z]/.test(password)) {
document.getElementById("upperCaseCheck").style.display = "flex";
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run