valibot
1.5.0 · 9 Sep 2026MIT32M / weekRepositoryHomepagenpmAtom feed
1.5.0 is the newest release of 1.x.
In short
2 new3 fixed4 changed
Security
1 advisory affects 1.4.0; 1.4.2 fixes them
- ModerateValibot: record() issue paths can make flatten() throw for inherited Object property namesGHSA-5qjj-4xww-7phc · 24 Jul 2026Fixed in 1.4.2
Release note
Many thanks to @ksaurav24, @heiwen, @compulim, @ysknsid25, @alaycock-stripe, @IlyaSemenov, @wszgrcy, @LMGO, @yslpn, @EltonLobo07 and @Eronmmer for contributing to this release.
Read the release notes on our website for a quick overview of the most exciting new features in this release.
Add
isoDateTimeSecondvalidation action to validate ISO date times with seconds (pull request #1418)Add
toCamelCase,toKebabCase,toPascalCaseandtoSnakeCasetransformation actions to convert strings between common naming conventions (pull request #1457)Change internal
ReadonlyOutputKeysandOutputWithReadonlytypes ofobjectschemas andWithReadonlytype ofrecordschemas to improve TypeScript type performance (pull request #1442)Change hot paths to reduce object allocations and improve runtime performance (pull request #1437)
Change build target to ES2020 so distributed output stays compatible with environments that lack support for newer syntax (pull request #1455)
Change internal
_LruCacheto use a TypeScriptprivatemethod instead of a#privateclass field to avoid runtime helpers in the transpiled output (pull request #1455)Change internal
_isValidObjectKeyto useObject.prototype.hasOwnProperty.callinstead ofObject.hasOwnso the distributed output stays compatible with runtimes that lack the ES2022Object.hasOwnbuiltin (pull request #1421)Change
flattenmethod to accept readonly issue arrays (pull request #1269)Fix potential
RangeErrorcaused by spreading large issue arrays (pull request #1437)Fix
creditCardvalidation action to reject Mastercard numbers with invalid lengths (pull request #1462)Fix
intersectschema to no longer mutate input values, allowing frozen objects and arrays to be merged (pull request #1463)