From acafc1da83f7aed2dbc7f3f6979ab581df5ad439 Mon Sep 17 00:00:00 2001 From: Abinaya Kesavan Date: Mon, 12 Aug 2024 23:05:33 +0530 Subject: [PATCH] Create landingPage.js --- assets/js/landingPage.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 assets/js/landingPage.js diff --git a/assets/js/landingPage.js b/assets/js/landingPage.js new file mode 100644 index 0000000..d21785d --- /dev/null +++ b/assets/js/landingPage.js @@ -0,0 +1,13 @@ +jQuery(function(){ + jQuery(document).on("click","#saveEmailId",function(){ + if(jQuery("#emailId").val()==""){ + alert("Email is empty"); + }else{ + var emailPattern=/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/g; + var emailid=jQuery("#emailId").val(); + if(emailPattern.test(emailid)==false){ + alert("The email address is not formatted correctly"); + } + } + }); +});