core.validator.enabled event
Triggered when a particular validator is enabled
The event
object contains the following properties:
Property | Type | Description |
---|
elements | HTMLElement[] | The field elements |
field | String | The field name |
formValidation | Core | The FormValidation instance |
validator | String | The validator name |
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.validator.enabled', function(event) {
...
});
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.validator.enabled', function(event) {
...
});
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.validator.enabled', function(event) {
...
});
See also