destroy() method

Destroy everything created by the library
It will remove all error messages, feedback icons as well as turning off the events. All the registered plugins and filters are removed too.
destroy(): Core
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.destroy();
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.destroy();
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.destroy(...);

See also