setFieldOptions() method

Set the options for given field
setFieldOptions(field: String, options: FieldOptions): Core
(* denotes a required parameter)
ParameterTypeDescription
field*StringThe field name
options*FieldOptionsThe field options
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.setFieldOptions(...);
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.setFieldOptions(...);
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.setFieldOptions(...);