From 81f9d6f5972ffff2bad5d9cdabeb3b7448433727 Mon Sep 17 00:00:00 2001
From: Yulong Wang <wangy567@cardiff.ac.uk>
Date: Tue, 3 Dec 2024 11:30:05 +0000
Subject: [PATCH] Delete emailValidation.js

---
 .../resources/static/js/emailValidation.js    | 69 -------------------
 1 file changed, 69 deletions(-)
 delete mode 100644 src/main/resources/static/js/emailValidation.js

diff --git a/src/main/resources/static/js/emailValidation.js b/src/main/resources/static/js/emailValidation.js
deleted file mode 100644
index e3532bd..0000000
--- a/src/main/resources/static/js/emailValidation.js
+++ /dev/null
@@ -1,69 +0,0 @@
-$(document).ready(function () {
-    const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; // 简单 Email 正则
-    //Listen for input events using jQuery's on method
-
-    $('#email').on('input', function () {
-        const emailValue = $(this).val();
-        const $emailError = $('#emailError');
-
-        // Check whether the input is empty or does not match the regular expression
-        if (!emailPattern.test(emailValue) && emailValue !== '') {
-            $emailError.text("Please enter a valid email address.");
-            $emailError.show(); // Display error message
-        } else {
-            $emailError.text("");
-            $emailError.hide(); // Hide error message
-        }
-    });
-
-    $('#name').on('mouseleave', function () {
-        const value = $(this).val();
-        const $nameError = $('#nameError');
-
-        if (value == '') {
-            $nameError.text("Please enter data.");
-            $nameError.show();
-        } else {
-            $nameError.text("");
-            $nameError.hide();
-        }
-    });
-
-    $('#password').on('mouseleave', function () {
-        const value = $(this).val();
-        const $passwordError= $('#passwordError');
-
-        if (value == '') {
-            $passwordError.text("Please enter data.");
-            $passwordError.show();
-        } else {
-            $passwordError.text("");
-            $passwordError.hide();
-        }
-    });
-
-    $('#phone').on('mouseleave', function () {
-        const value = $(this).val();
-        const $phoneError= $('#phoneError');
-        // 检查输入是否为空或不符合正则表达式
-        if (value == '') {
-            $phoneError.text("Please enter data.");
-            $phoneError.show();
-        } else {
-            $phoneError.text("");
-            $phoneError.hide();
-        }
-    });
-    $('#address').on('mouseleave', function () {
-        const value = $(this).val();
-        const $addressError= $('#addressError');
-
-        if (value == '') {
-            $addressError.text("Please enter data.");
-            $addressError.show();
-        } else {
-            $addressError.text("");
-            $addressError.hide();
-        }
-    });
-});
\ No newline at end of file
-- 
GitLab