Getting Started

registerPlugin() method

Register a plugin
The plugin instance then can be accessed via the getPlugin() method , or removed completely by the deregisterPlugin() method .
            
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 the global script in the browser
            
const fv = FormValidation . formValidation (
document . getElementById ( 'demoForm' ) ,
{
...
}
) ;
fv . registerPlugin ( ... ) ;
Using the ES6 module
            
import { formValidation } from '/path/to/-validation/cjs/bundle/popular' ;
const fv = formValidation (
document . getElementById ( 'demoForm' ) ,
{
...
}
) ;
fv . registerPlugin ( ... ) ;
Using the npm package
            
import { formValidation } from '-validation/bundle/popular' ;
const fv = formValidation (
document . getElementById ( 'demoForm' ) ,
{
...
}
) ;
fv . registerPlugin ( ... ) ;