3

Is it okay to modify lib/web/mage/validation.js directly? If not, how do I override it? There's a bug there I want to fix. Thank you.

1 Answer 1

10

No don't edit that file directly as it is a core file, you can overwrite it by adding it to your theme here:

app/design/frontend/STORE/THEME/web/mage/validation.js

Or alternatively you can use Require JS to change the file called as this answer explains

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.