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>

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.



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.

  • Seems this code change is already there in Magento-2.3 – Pupil Dec 31 '20 at 4:56
  • In my case, my other JavaScript files were creating issues. – Pupil Dec 31 '20 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.