registerPlugin() method
Register a plugin
registerPlugin(name: String, plugin: Object): Core
(* denotes a required parameter)
| Parameter | Type | Description |
|---|
name* | String | The name of plugin |
plugin* | Object | The plugin instance |
Using in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.registerPlugin(...);
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.registerPlugin(...);