Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

1 line password strength checker jquery

// 1 line password validation for
// Uppercase, Lowercase, Number, Special Character
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>
$("#submit_id").click(function() {

				var pattern = /^.*(?=.{8,})(?=.*d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%&]).*$/;
				if(!pattern.test($("#pswd").val())){
					alert("INVALID PASSWORD");
				}else{
					alert("You have a strong PASSWORD");
					
				}


	});
 
PREVIOUS NEXT
Tagged: #line #password #strength #checker #jquery
ADD COMMENT
Topic
Name
4+8 =