Validate Email Password Using jQuery

Today, We want to share with you Validate Email Password Using jQuery.In this post we will show you jquery email validation regex, hear for password and confirm password validation in javascript we will give you demo and example for implement.In this post, we will learn about password validation in javascript using regular expression with an example.

Validate Email Password Using jQuery

There are the Following The simple About Validate Email Password Using jQuery Full Information With Example and source code.

As I will cover this Post with live Working example to develop Password Validation using regular expressions, so the Email Validation Using jQuery Codes for this example is following below.

Also Read This πŸ‘‰   $digest() Function using Angular Example

jQuery Email-Password Validation Checks

index.html

<html>
<head>
<title></title>
<link href="validate_style.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function validate()
{
 var email=$("#email").val();
 var pass=$("#password").val();
 
 var email_regex=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 var setrules1=/([a-z].*[A-Z])|([A-Z].*[a-z])([0-9])+([!,%,&,@,#,$,^,*,?,_,~])/;
 var setrules2=/([0-9])/;
 var setrules3=/([!,%,&,@,#,$,^,*,?,_,~])/;

 if(email_regex.test(email)==false)
 {
  alert("Please Enter Correct Email");
  return false;	
 }
 else if(pass.length<8 || setrules1.test(pass)==false || setrules2.test(pass)==false || setrules3.test(pass)==false)
 {
  alert("Please Enter Strong Password");
  return false;
 }
 else
 {
  return true;
 }
}
</script>
</head>
<body>
<div id="wrapper">

<div id="user_form">
<p id="form_label">REGISTER FORM</p>
 <form method="post" onsubmit="return validate();">
  <input type="text" id="email" placeholder="Enter Email">>
  <input type="password" id="password" placeholder="*******">>
  <input type="submit" value="SUBMIT">
 </form>
<p id="pass_note">Password Must Be At Least 8 Digits Long And Contains One UpperCase, One LowerCase And One Special Character</p>
</div>

</div>
</body>
</html>

Step 2: validate_style.css
body
{
 margin:0 auto;
 padding:0px;
 text-align:center;
 width:100%;
 font-family: "Myriad Pro","Helvetica Neue",Helvetica,Arial,Sans-Serif;
 background-color:#ECF0F1;
}
#wrapper
{
 margin:0 auto;
 padding:0px;
 text-align:center;
 width:995px;
}
#wrapper h1
{
 margin-top:50px;
 font-size:45px;
 color:#626567;
}
#wrapper h1 p
{
 font-size:18px;
}
#user_form
{
 background-color:#B3B6B7;
 width:300px;
 margin-left:330px;
 padding:10px;
}
#user_form #form_label
{
 margin:0px;
 margin-bottom:20px;
 font-size:25px;
 font-weight:bold;
 color:#626567;
 text-decoration:underline;
}
#user_form input[type="text"],input[type="password"]
{
 width:250px;
 height:35px;
 padding:10px;
 margin-top:5px;
}
#user_form input[type="submit"]
{
 width:248px;
 height:35px;
 margin-top:5px;
 margin-left:-3px;
 background:none;
 border:1px solid white;
 color:white;
 font-weight:bold;
}
#user_form #pass_note
{
 color:#424242;
 font-size:14px;
 font-style:italic;
}

Angular 6 CRUD Operations Application Tutorials

Read :

Also Read This πŸ‘‰   Email Validation in pure JavaScript | Validate email address

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Validate Email Password Using jQuery.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.