Hi,
May I know how to use below in theme?
https://formvalidation.io/guide/plugins/auto-focus/
I discovered they included additional file /vendors/formvalidation/dist/js/plugins/AutoFocus.min.js which is not included in theme, thanks.
Hi,
Sorry for the late reply.
If you are using Gulp build you just need to edit tools/gulp.config.js
and add required formvalidations as shown below:
formvalidation: {
{
styles: [
"{$config.path.common_src}/plugins/formvalidation/dist/css/formValidation.css",
],
scripts: [
"{$config.path.node_modules}/es6-shim/es6-shim.js",
"{$config.path.common_src}/plugins/formvalidation/dist/js/FormValidation.full.min.js",
"{$config.path.common_src}/plugins/formvalidation/dist/js/plugins/Bootstrap5.min.js"
],
},
tools/webpack/plugins/plugins.js
// FormValidation - Best premium validation library for JavaScript. Zero dependencies. Learn more: https://formvalidation.io/
window.FormValidation = require("@/src/plugins/formvalidation/dist/js/FormValidation.full.min.js");
window.FormValidation.plugins.Bootstrap5 = require("@/src/plugins/formvalidation/dist/amd/plugins/Bootstrap5.js").default;