enableValidator() method
Enable particular validator for given field
enableValidator(field: String, validator: String): Core
(* denotes a required parameter)
Parameter | Type | Description |
---|
field * | String | The field name |
validator | String | The validator name. If it isn't specified, all validators will be enabled |
Using in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.enableValidator(...);
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.enableValidator(...);
See also