disableValidator() method
Disable particular validator for given field
disableValidator(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 disabled |
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.disableValidator(...);
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.disableValidator(...);
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.disableValidator(...);
See also