Bootstrap 4 Password Strength Meter Example - zxcvbn

The content of the form inputs and the words samurai, shogun, bushido, daisho and seppuku are disrecommended in the password, and the score will adjust properly.

jQuery(document).ready(function () {
    "use strict";
    var options = {};
    options.ui = {
        container: "#pwd-container",
        viewports: {
            progress: ".pwstrength_viewport_progress",
            verdict: ".pwstrength_viewport_verdict"
        }
    };
    options.common = {
        onLoad: function () {
            $('#messages').text('Start typing password');
        },
        zxcvbn: true,
        zxcvbnTerms: ['samurai', 'shogun', 'bushido', 'daisho', 'seppuku'],
        userInputs: ['#year', '#familyname']
    };
    $(':password').pwstrength(options);
});

Go back