disablePlugin() method

Disable a particular plugin
disablePlugin(name: String): Core
(* denotes a required parameter)
ParameterTypeDescription
name*StringThe plugin name
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
fields: {
...
},
plugins: {
wizard: new FormValidation.plugins.Wizard({
...
}),
}
}
);
// Disable the Wizard plugin
fv.disablePlugin('wizard');
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/esm/bundle/popular';
import { Wizard } from '/path/to/@form-validation/esm/plugin-wizard';
const fv = formValidation(
document.getElementById('demoForm'),
{
fields: {
...
},
plugins: {
wizard: new Wizard({
...
}),
}
}
);
// Disable the Wizard plugin
fv.disablePlugin('wizard');
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
import { Wizard } from '@form-validation/plugin-wizard';
const fv = formValidation(
document.getElementById('demoForm'),
{
fields: {
...
},
plugins: {
wizard: new Wizard({
...
}),
}
}
);
// Disable the Wizard plugin
fv.disablePlugin('wizard');