getPlugin() method
Return an instance of plugin by given name
getPlugin(name: String): Plugin
(* denotes a required parameter)
Parameter | Type | Description |
---|
name * | String | The plugin name |
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
const plugin = fv.getPlugin(...);
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
const plugin = fv.getPlugin(...);
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
const plugin = fv.getPlugin(...);