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 in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
const invalidFieldHandler = function(field) {
...
};
fv.off('core.field.invalid', invalidFieldHandler);
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
const invalidFieldHandler = function(field) {
...
};
fv.off('core.field.invalid', invalidFieldHandler);