简体   繁体   English

如何在Magento 2中覆盖jquery.validate

[英]How to override jquery.validate in Magento 2

I'm using magento 2.1. 我正在使用magento 2.1。 version. 版。

I have tried to override file lib/web/jquery/jquery.validate.js and still I don't know how to make it work. 我试图覆盖文件lib/web/jquery/jquery.validate.js ,但我仍然不知道如何使它工作。

var config = {
    map: {
        '*': {
            'jquery/jquery.validate':'js/jquery.validate',
        }
    },
};

I put this code in requirejs-config.js in theme. 我将此代码放在主题的requirejs-config.js中。 Next I create jquery.validate in web/js. 接下来,我在web / js中创建jquery.validate。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM