1

How to override file app/lib/web/mage/validation.js?

I want to change the System Error Message in this JS file.

Please help

2 Answers 2

7

You can override it by placing it under your custom theme on the below path.

/app/design/frontend/[Vendor]/[Theme]/web/mage/validation.js

After placing this file, please run the below commands to reflect the changes.

php bin/magento s:up
php bin/magento s:s:d -f
php bin/magento c:f

Hope it helps!!!

2
  • 1
    Thanks! its work! I think I didn't do all steps of CLI
    – Paul Fan
    Commented Apr 28, 2020 at 6:08
  • Yes, its just for make sure for removing the cache and static files from the website.
    – Sumit
    Commented Apr 28, 2020 at 6:10
1

Go to this path and override you want to file:-

/app/design/frontend/[Vendor_Name]/[Theme_Name]/web/mage/validation.js

you put override the file after the run some command :-

php bin/magento s:up
php bin/magento s:s:d -f
php bin/magento c:c
php bin/magento c:f

Hope this help

Thanks ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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