Skip to content

Plugins

Plugins extend the Validare core engine. Pass them in the plugins option map.

Core Plugins

PluginDescription
TriggerValidates on DOM events (blur, input, change)
MessageDisplays error messages in the DOM
IconShows valid/invalid icons next to fields
SubmitButtonDisables the submit button during validation
ExcludedSkips disabled, hidden, or invisible fields
SequenceStops validation at the first failing validator per field
AriaAdds aria-invalid and aria-describedby for screen reader accessibility
AutoFocusFocuses the first invalid field automatically after form validation fails
TooltipShows error messages in a floating tooltip on hover or click
DefaultSubmitAutomatically submits the form when all fields are valid
FieldStatusTracks per-field validation status and fires a callback on change
DeclarativeConfigure validators via HTML data-vd-* attributes, no JavaScript needed

CSS Framework Plugins

PluginFramework
Bootstrap5Applies Bootstrap 5 is-valid / is-invalid classes
BulmaApplies Bulma is-success / is-danger classes
TailwindApplies configurable Tailwind utility classes

Utility Plugins

PluginDescription
DependencyRevalidates dependent fields when a primary field validates
StartEndDateEnsures start date ≤ end date across two fields
TransformerTransforms the value seen by a specific validator
PasswordStrengthEvaluates password strength with a 0–4 score and minimum threshold
CharCounterDisplays a live character counter for fields with a stringLength max
SummaryRenders a consolidated list of all form errors in a fixed container

Released under the MIT License.