1

When customers attempt to create an account they are currently seeing "Please enter 7 or more characters, using both numeric and alphabetic." as the password validation error message.

I have already changed the validation via regular expression to 8 or more characters containing at least 1 number, 1 uppercase, and 1 lowercase letter.

So, Where can I change the error message to match the criteria?

Thanks, Rob

1
  • which file you changed and please tell the file path also? May 20 at 16:25
0

Please open this file your_app_root_folder/lib/web/mage/validation.js .
In this file search for Please enter 7 or more characters, using both numeric and alphabetic.
Then change this error message and do setup:upgrade,compile, deploy etc and all other general steps.
This solution worked for me also and I hope it will work for you also.
And also in this javascript function validate-admin-password you can also edit the password length to 8.

Edit - Adding more files for your reference
I am Sharing some more files which may be useful you may check them -

  1. /lib/web/i18n/en_US.csv
  2. lib/web/prototype/validation.js
  3. vendor/magento/magento2-base/lib/web/i18n/en_US.csv
  4. vendor/magento/magento2-base/lib/web/mage/validation.js
  5. vendor/magento/magento2-base/lib/web/prototype/validation.js
  6. vendor/magento/module-ui/i18n/en_US.csv
  7. vendor/magento/module-ui/view/base/web/js/lib/validation/rules.js
3
  • This does not work.
    – ozmo
    May 21 at 2:09
  • I edited my answer, shared more files you may check your string there. May 21 at 15:57
  • I have changed all these files but still no change.
    – ozmo
    Jun 2 at 11:03

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.