From c52096ba230940f4d1cc73de3a599e11a9a0c3a1 Mon Sep 17 00:00:00 2001 From: smog-root Date: Mon, 14 Oct 2024 12:13:10 +0530 Subject: [PATCH] Password_Minimum_Requirement_For_Signup --- public/signup.html | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/public/signup.html b/public/signup.html index 90198a6..1fb654a 100644 --- a/public/signup.html +++ b/public/signup.html @@ -1,5 +1,3 @@ - - @@ -8,6 +6,27 @@ Registration + + @@ -23,15 +42,20 @@

Error Occurred! Please Try Again

-
-

Registration

-

(for Researchers)

+ +

Registration

+

(for Researchers)

+ + + + Password must be at least 8 characters long, including at least one uppercase letter, one lowercase letter, one number, and one special character.
+
@@ -52,6 +76,11 @@

(for R } document.getElementById('registrationForm').addEventListener('submit', async function (event) { + // Validate password before submission + if (!validatePassword()) { + return; // Prevent form submission if validation fails + } + event.preventDefault(); let name = document.getElementById('name').value; @@ -68,7 +97,7 @@

(for R // Check if the email domain is allowed if (!allowedDomains.includes(emailDomain)) { - result2.innerHTML = "Invalid email domain. Please use Gmail, Outlook, Yahoo, Protonmail, Icloud, or Tutanota. "; + result2.innerHTML = "Invalid email domain. Please use Gmail, Outlook, Yahoo, Protonmail, Icloud, or Tutanota."; result2.style.display = 'block'; setTimeout(() => { result2.style.display = 'none';