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)
| Parameter | Type | Description |
|---|
field* | String | The field name |
ele* | HTMLElement | The field element |
validator | String | The validator name |
Using in the browser
const fv = FormValidation.formValidation(
document.getElementById('demoForm'),
{
...
}
);
const elementValue = fv.getElementValue(...);
Using with ES6 module
import formValidation from 'formvalidation/dist/es6/core/Core';
const fv = formValidation(
document.getElementById('demoForm'),
{
...
}
);
const elementValue = fv.getElementValue(...);