Skip to Content
NFSFU234FormValidation v3 is here — file upload validation, config-driven rules, and more.
v3 (current)validateAllSelect

validateAllSelect

Validates every <select> field in the form. Returns: boolean \| ErrorMessageInterface \| ErrorMessageInterface[]

ParameterTypeRequiredDefaultDescription
form`HTMLFormElement \HTMLDivElement`required-
optionsanyrequired-Custom error messages / overrides keyed by field name.
Usage
Example: Validate All Select Inputs in a Form
const formElement = document.getElementById('myForm'); const result = validateAllSelect(formElement, { message: 'Please select an option from all dropdowns.' }); console.log(result);
Last updated on