Plugins
Plugins extend the Validare core engine. Pass them in the plugins option map.
Core Plugins
| Plugin | Description |
|---|---|
| Trigger | Validates on DOM events (blur, input, change) |
| Message | Displays error messages in the DOM |
| Icon | Shows valid/invalid icons next to fields |
| SubmitButton | Disables the submit button during validation |
| Excluded | Skips disabled, hidden, or invisible fields |
| Sequence | Stops validation at the first failing validator per field |
| Aria | Adds aria-invalid and aria-describedby for screen reader accessibility |
| AutoFocus | Focuses the first invalid field automatically after form validation fails |
| Tooltip | Shows error messages in a floating tooltip on hover or click |
| DefaultSubmit | Automatically submits the form when all fields are valid |
| FieldStatus | Tracks per-field validation status and fires a callback on change |
| Declarative | Configure validators via HTML data-vd-* attributes, no JavaScript needed |
CSS Framework Plugins
| Plugin | Framework |
|---|---|
| Bootstrap5 | Applies Bootstrap 5 is-valid / is-invalid classes |
| Bulma | Applies Bulma is-success / is-danger classes |
| Tailwind | Applies configurable Tailwind utility classes |
Utility Plugins
| Plugin | Description |
|---|---|
| Dependency | Revalidates dependent fields when a primary field validates |
| StartEndDate | Ensures start date ≤ end date across two fields |
| Transformer | Transforms the value seen by a specific validator |
| PasswordStrength | Evaluates password strength with a 0–4 score and minimum threshold |
| CharCounter | Displays a live character counter for fields with a stringLength max |
| Summary | Renders a consolidated list of all form errors in a fixed container |