Getting Started

off() method

Remove the given handler on particular event
            
off ( event : String , func : Function ) : Core
(* denotes a required parameter)
Parameter Type Description
event * String The event name
func * Function The event handler
Using the global script in the browser
            
const fv = FormValidation . formValidation (
document . getElementById ( 'demoForm' ) ,
{
...
}
) ;
const invalidFieldHandler = function ( field ) {
// `field` is name of invalid field
...
} ;
fv . off ( 'core.field.invalid' , invalidFieldHandler ) ;
Using the ES6 module
            
import { formValidation } from '/path/to/-validation/cjs/bundle/popular' ;
const fv = formValidation (
document . getElementById ( 'demoForm' ) ,
{
...
}
) ;
const invalidFieldHandler = function ( field ) {
// `field` is name of invalid field
...
} ;
fv . off ( 'core.field.invalid' , invalidFieldHandler ) ;
Using the npm package
            
import { formValidation } from '-validation/bundle/popular' ;
const fv = formValidation (
document . getElementById ( 'demoForm' ) ,
{
...
}
) ;
const invalidFieldHandler = function ( field ) {
// `field` is name of invalid field
...
} ;
fv . off ( 'core.field.invalid' , invalidFieldHandler ) ;