In this post we are going to learn how to create password strength meter using jquery Complexify plugin, Here we’ll use this plugin to check complexity of password entered by user, It is good idea when people are going to register on your website then create a automated system program to help identify user that they are choosing strong password for their new account so that no one can guess the password easily.
Using jquery Complexify plugin you can easily add password strength meter with your password field and it’ll show complexity of the password in % with bar, so that user can easily choose more strong password.
Here is integration.
Add required jquery libraries on page.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js">script> <script type="text/javascript" src="jquery.complexify.min.js">script> |
Sample HTML
Finally put javascript on page to make it actionable.
Javascript
<script type="text/javascript"> $(function(){ $("#pass").complexify({}, function(valid, complexity){ //console.log("Password complexity: " + Math.round(complexity)); $("#pg").val(Math.round(complexity)); $("#cpx").html(Math.round(complexity)+'%'); }); }); script> |
See live demo and download source code..