Skip to content

Commit

Permalink
Merge pull request #1007 from nwanduka/patch-4
Browse files Browse the repository at this point in the history
Improved email validation error message
  • Loading branch information
birm authored Jul 8, 2024
2 parents df5458b + ce904b4 commit bf6a2a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/signup/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]';
}


Expand Down Expand Up @@ -119,4 +119,4 @@ $(window).on('load', function() {
function loginPage(){
const url = "/login.html";
window.location.href = url;
}
}

0 comments on commit bf6a2a1

Please sign in to comment.