From ce904b4a72a3311cf70e15aae902eace8dd4b41a Mon Sep 17 00:00:00 2001 From: Victoria Nduka <122698422+nwanduka@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:03:26 +0100 Subject: [PATCH] improved email validation error msg --- apps/signup/signup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/signup/signup.js b/apps/signup/signup.js index ddf6d1348..0c388e97a 100644 --- a/apps/signup/signup.js +++ b/apps/signup/signup.js @@ -14,7 +14,7 @@ function addUser(){ if (email === '') { emailErr.textContent = 'Please enter your email'; } else if (!(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(email))) { - emailErr.textContent = 'Please enter a valid email'; + emailErr.textContent = 'Please enter a valid email address. For example: name@example.com'; } @@ -119,4 +119,4 @@ $(window).on('load', function() { function loginPage(){ const url = "/login.html"; window.location.href = url; -} \ No newline at end of file +}