Overview

A collection of public methods

After initializing the form with FormValidation.formValidation(), you can access the public methods provided by formValidation.

Using in the browser





document.addEventListener('DOMContentLoaded', function(e) {
    const fv = FormValidation.formValidation(
        document.getElementById('demoForm'),
        {
            ...
        }
    );

    // Call the public methods
    fv.METHOD_NAME(PARAMETERS);
});

Using with JavaScript module


// You might need to change the importing path
import formValidation from 'formvalidation/core/Core';

// Initialize somewhere depending on the JavaScript framework you are using
const fv = formValidation(
    document.getElementById('demoForm'),
    {
        ...
    }
);

// Call the public methods
fv.METHOD_NAME(PARAMETERS);

The next sections list all of public methods provided by library.