resetField() method

Reset the field
This method also clears all the messages, hide the feedback icons, etc.
resetField(field: String, reset: Boolean): Core
(* denotes a required parameter)
ParameterTypeDescription
field*StringThe field name
resetBooleanIf true, the method resets field value to empty or remove checked, selected attributes
Using in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.resetField(...);
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.resetField(...);

See also