updateFieldStatus() method

Update the field status
updateFieldStatus(field: String, status: String, validator: String): Core
(* denotes a required parameter)
ParameterTypeDescription
field*StringThe field name
status*StringThe new status
validatorStringThe validator name. If it isn't specified, all validators will be updated
The status parameter can be one of the following value:
ValueDescription
'NotValidated'The field is not yet validated
'Valid'The field is valid
'Invalid'The field is invalid
Using in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.updateFieldStatus(...);
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.updateFieldStatus(...);

See also