updateValidatorOption() method
Update option of particular validator for given field
updateValidatorOption(
field: String,
validator: String,
name: String,
value: Any
): Core
(* denotes a required parameter)
Parameter | Type | Description |
---|
field * | String | The field name |
validator * | String | The validator name |
name * | String | The option's name |
value * | Any | The option's value |
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.updateValidatorOption(...);
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.updateValidatorOption(...);
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.updateValidatorOption(...);
See also