Question

I have a fresh installation of Magento 2.2.5 CE & tried to create new user on frontend when we type password like Password1

strangely strength meter not showing like weak, strong, very strong its simply say no password but passed the password validation.

Validation Rule:

<div class="field password required">
    <label for="password" class="label"><span>Password</span></label>
    <div class="control">
        <input type="password" name="password" id="password" title="Password" class="input-text valid" data-password-min-length="8" data-password-min-character-sets="3" data-validate="{required:true, 'validate-customer-password':true}" autocomplete="off" aria-required="true"><div for="password" generated="true" class="mage-error" id="password-error" style="display: none;">Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters.</div>
        <div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite" class="password-none">
            <div id="password-strength-meter" class="password-strength-meter">
                Password Strength:
                <span id="password-strength-meter-label" data-role="password-strength-meter-label">No Password</span>
            </div>
        </div>
    </div>
</div>

Image: enter image description here

Looking forward to:

1) is this Magento bug? if yes share the bug link.

2) need workaround for this? or point out to fix this.

Thanks

Was it helpful?

Solution

You are probably referring to this issue.

And this is the commit that probably fixes your problem.

You need to override app/code/Magento/Customer/view/frontend/web/js/password-strength-indicator.js, and change line 86 to:

displayScore = isValid && zxcvbnScore > 0 ? zxcvbnScore : 1;

See detailed info the aforementioned issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top