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
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