Changelog
All notable changes to Validare are documented here.
The format follows Keep a Changelog, and this project adheres to Semantic Versioning.
[3.0.0] — 2026-06-17
Breaking Changes
- CSS class namespace renamed — All plugin-generated CSS classes changed from
fv-plugins-*tovd-plugins-*. Update any custom CSS or selectors that reference the old names:fv-plugins-message-container→vd-plugins-message-containerfv-plugins-message→vd-plugins-messagefv-plugins-icon→vd-plugins-iconfv-plugins-icon--valid→vd-plugins-icon--validfv-plugins-icon--invalid→vd-plugins-icon--invalidfv-plugins-tooltip→vd-plugins-tooltipfv-plugins-tooltip--show→vd-plugins-tooltip--showfv-plugins-char-counter→vd-plugins-char-counterfv-plugins-char-counter--exceeded→vd-plugins-char-counter--exceededfv-plugins-summary→vd-plugins-summary
- Declarative plugin attribute prefix renamed — The default HTML attribute prefix changed from
data-fv-*todata-vd-*. Update alldata-fv-*attributes in your HTML, or passprefix: 'data-fv-'to theDeclarativeplugin constructor to keep the old prefix.
Added
MIGRATING.md— Migration guide from FormValidation covering all breaking behavior changes (blank,creditCard,date,email).
[2.3.0] — 2026-05-29
Added
core.field.valid/core.field.invalid/core.field.notvalidatedevents — Fired aftercore.field.validated, providing convenience shortcuts for reacting to a specific field outcome without inspecting the payload.core.element.validatingevent — Fired before each DOM element begins validation.core.element.ignoredevent — Fired when an element is skipped because it has no active validators.core.element.notvalidatedevent — Fired when an element's validation result isNotValidated.core.validator.validatingevent — Fired before each individual validator runs.core.validator.notvalidatedevent — Fired when a validator is skipped or its factory is not registered.core.validator.enabled/core.validator.disabledevents — Fired byenableValidator()anddisableValidator()respectively.blankvalidator — Validates that a field is empty. The opposite ofnotEmpty. Supports the sametrimoption.CharCounterplugin — Displays a live character counter inside a.vd-plugins-char-countercontainer element. Updates on every keystroke and adds a configurable CSS class when the count exceedsmax.Summaryplugin — Renders a consolidated list of all form errors inside a.vd-plugins-summarycontainer. Clears automatically oncore.form.validandcore.form.reset. Supports custom title, item renderer, and auto-scroll.
[2.2.0] — 2026-05-28
Added
- Aria plugin — Adds
aria-invalidandaria-describedbyattributes automatically, linking error containers to their fields for screen-reader accessibility. - AutoFocus plugin — Moves focus to the first invalid field after a failed form validation. Supports an
onPrefocuscallback for custom focus logic. - PasswordStrength plugin — Evaluates password strength on a 0–4 scale (length, uppercase, digit, special character) and rejects passwords below a configurable minimum score.
- Tooltip plugin — Displays validation error messages in a floating tooltip instead of an inline
<div>. Supportshover(default) andclicktriggers and four placements (top,bottom,left,right). - DefaultSubmit plugin — Automatically calls
form.submit()when all fields pass validation. Throws a clear error on install if any control namedname="submit"would shadow the native method. - FieldStatus plugin — Tracks per-field validation status (
NotValidated,Validating,Valid,Invalid) and fires anonStatusChanged(boolean)callback on every change. ExposesgetStatuses()andareFieldsValid()methods. - Declarative plugin — Configures field validators entirely through HTML
data-vd-*attributes — nofieldsoption in JavaScript needed. Supports a___separator for validator options, a configurableprefix, anhtml5Inputmode that maps native HTML5 attributes (required,type,minlength,pattern,min,max, …) to validators, and dynamic field detection viacore.field.added.
Fixed
- Aria: unique container IDs are now generated per instance to avoid collisions when multiple Validare instances share a page.
- Aria: the
aria-describedbycontainer is cleaned up andaria-invalidis reset when a field transitions to Valid. - AutoFocus: statuses are cleared on
core.form.validatingso re-validations start with a clean slate; fixed status not resetting correctly onfv.reset(). - DefaultSubmit: the
name="submit"safety guard now covers all form controls (not justtype="submit"buttons). - Tooltip: fixed a null-reference crash in
uninstall()when the tooltip element had not been created yet. - Declarative: added a null guard on
options.validatorsinonFieldAddedto prevent crashes from malformed dynamic field configs.
[2.1.0] — 2026-05-27
Added
- Dependency plugin — Prevents validation of a field until one or more other named fields have been validated first. Useful for "confirm password" patterns.
- StartEndDate plugin — Cross-validates a pair of date fields so the start date is always before (or equal to) the end date. Configurable
format,min, andmaxbounds. - Transformer plugin — Intercepts the value read by each validator through the
field-valuefilter, allowing normalisation (trimming, stripping formatting characters, etc.) without mutating the DOM. Messageplugin:firstoption — when set totrue, only the first failing validator's message is shown per field (requires theSequenceplugin to be present).field-valuefilter — New Core filter hook used by the Transformer plugin.removeValidator/deregisterValidatorCore methods — Remove a specific validator from a single field or unregister a validator factory globally.
Fixed
- Sequence plugin: multiple error messages were appearing on the first validation run because the
element-validatedfilter was not applied early enough. Fixed by moving the filter application to the correct phase. - Trigger plugin: field validation cache was not cleared before re-validating on DOM events, causing stale results.
- StartEndDate: unique instance keys prevent cross-instance interference;
parseDatenow rejects overflowed calendar dates (e.g. February 30). - Dependency: widened payload cast and tightened loop guard.
[2.0.0] — 2026-05-20
Added
- 28 additional validators across six new categories, bringing the total to 50:
- Format & Encoding (6):
base64,hex,mac,bic,uuid,color - Financial (6):
iban,vat,cusip,isin,sedol,grid - Publication (4):
ean,isbn,ismn,issn - Device & Vehicle (5):
imei,imo,meid,step,vin - Tax & Business (4):
ein,rtn,siren,siret - Identity & Geographic (3):
id,phone,zipCode
- Format & Encoding (6):
Changed
- Validator registry is now populated at startup from a single index (
src/validators/index.ts) — no Core changes required when adding new validators.
[1.0.0] — 2026-05-14
Added
- Core validation engine (
Core,Plugin,Emitter,Filter) - 22 core validators:
notEmpty,email,creditCard,date,digits,integer,numeric,regexp,uri,identical,different,between,greaterThan,lessThan,stringLength,stringCase,choice,file,callback,promise,remote,ip - 9 core plugins:
Trigger,Message,Icon,SubmitButton,Excluded,Sequence,Aria(v1),Bootstrap5,Bulma,Tailwind - Locales:
en_US(default),pt_BR - TypeScript-first API with full type exports
- ESM, CJS, and UMD bundles via tsup