core.element.validated event

Triggered after validating a field element
The event object contains the following properties:
PropertyTypeDescription
elementHTMLElementThe field element which is being validated
elementsHTMLElement[]The field elements
fieldStringThe field name
validBooleanCan be true if the field element is valid, false otherwise
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.element.validated', 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.element.validated', function(event) {
...
});
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv.on('core.element.validated', function(event) {
...
});

See also