core.element.validated event
Triggered after validating a field element
The event object contains the following properties:
| Property | Type | Description |
|---|
element | HTMLElement | The field element which is being validated |
elements | HTMLElement[] | The field elements |
field | String | The field name |
valid | Boolean | Can be true if the field element is valid, false otherwise |
Using in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.element.validated', function(event) {
...
});
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.element.validated', function(event) {
...
});
See also