validate() method
Validate all fields
It might be used when you want to validate the form manually when pressing given button.
If you want the form to be validated automatically when pressing its Submit button, use the
SubmitButton pluginUsing in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv
.validate()
.then(function(status) {
...
});
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
fv
.validate()
.then(function(status) {
...
});
See also