Horje
1 line password strength checker jquery Code Example
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");
					
				}


	});
1 line password strength checker jquery

var pass = "f00Bar!";

var strength = 1;
var arr = [/.{5,}/, /[a-z]+/, /[0-9]+/, /[A-Z]+/];
jQuery.map(arr, function(regexp) {
  if(pass.match(regexp))
     strength++;
});

Source: devarama.com




Javascript

Related
Capitalize first letter of string on json sending Code Example Capitalize first letter of string on json sending Code Example
how to navigate with navintems for react-bootstrap without refreshing the whole page Code Example how to navigate with navintems for react-bootstrap without refreshing the whole page Code Example
how to access items inside anonymous object Code Example how to access items inside anonymous object Code Example
error: cannot find module 'html' express Code Example error: cannot find module 'html' express Code Example
jquery selector parent on hover Code Example jquery selector parent on hover Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8