getElementValue() method

Return the element value
The element value might be modified by the field-value filter, via the Transformer plugin, for example
getElementValue(field: String, ele: HTMLElement, validator: String): String
(* denotes a required parameter)
ParameterTypeDescription
field*StringThe field name
ele*HTMLElementThe field element
validatorStringThe validator name
Using the global script in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
const elementValue = fv.getElementValue(...);
Using the ES6 module
import { formValidation } from '/path/to/@form-validation/cjs/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
const elementValue = fv.getElementValue(...);
Using the npm package
import { formValidation } from '@form-validation/bundle/popular';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
const elementValue = fv.getElementValue(...);