addField() method

Add a field
addField(field: String, options: Object): Core
(* denotes a required parameter)
ParameterTypeDescription
field*StringThe field name
optionsObjectThe field options. The options will be merged with the original validator rules if the field is already defined
Using in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.addField(...);
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.addField(...);

See also