-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathform.js
More file actions
23 lines (21 loc) · 676 Bytes
/
Copy pathform.js
File metadata and controls
23 lines (21 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const username = document.getElementById("username");
const email = document.getElementById("email");
const password = document.getElementById("password");
const form = document.getElementById("form");
form.addEventListener("submit", (e) => {
// Add your form validation and submission laogic here
if (
name.value === "" ||
email.value === "" ||
password.value === ""
) {
alert("please fill in all required fields.");
/* if (password.value.length < 8) {
alert("Password must be at least 8 characters long");
}
if (password.value === "password") {
alert("Password cannot be password");
}
e.preventDefault();
validateform(); */
});