FormValidation.formValidation()
, you can access the public methods provided by
formValidation
.
<
script
src
=
"
/vendors/formvalidation/dist/js/FormValidation.min.js
"
>
script
>
<
script
>
document
.
addEventListener
(
'DOMContentLoaded'
,
function
(
e
)
{
const
fv
=
FormValidation
.
formValidation
(
document
.
getElementById
(
'demoForm'
)
,
{
...
}
)
;
// Call the public methods
fv
.
METHOD_NAME
(
PARAMETERS
)
;
}
)
;
script
>
// You might need to change the importing path
import
formValidation
from
'formvalidation/dist/es6/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
)
;