Packages

valibot

1.5.0 · 9 Sep 2026MIT32M / weekRepositoryHomepagenpmAtom feed

Your version

1.0.0

major19 Mar 2025Where it was published

1.5.0 is the newest release of 1.x.

In short

14 new5 fixed15 changed

Security

2 advisories affect 1.0.0; 1.4.2 fixes them

Release note

This is a summary of the changes between v0 and v1. Many thanks to everyone who contributed to this release.

  • Add assert method to assert values (issue #862)

  • Add checkItemsAsync action (pull request #856)

  • Add graphemes, maxGraphemes, minGraphemes and notGraphemes action (pull request #853)

  • Add words, maxWords, minWords and notWords action

  • Add args and returns action to transform functions (issue #243)

  • Add rfcEmail action to validate RFC 5322 email addresses (pull request #912)

  • Add gtValue and ltValue action for greater than and less than validation (pull request #978, #985)

  • Add values and notValues action for easier multi-value validation (pull request #919)

  • Add slug action to validate URL slugs (pull request #910)

  • Add support for ReadonlyMap and ReadonlySet to readonly action (issue #1059)

  • Add entriesFromObjects util to improve tree shaking (pull request #1023)

  • Add new overload signature to pipe and pipeAync method to support unlimited pipe items of same input and output type (issue #852)

  • Add @__NO_SIDE_EFFECTS__ notation to improve tree shaking (pull request #995)

  • Add exactOptional and exactOptionalAsync schema (PR #1013)

  • Change types and implementation to support Standard Schema

  • Change behaviour of minValue and maxValue for NaN (pull request #843)

  • Change type and behaviour of nullable, nullableAsync, nullish, nullishAsync, optional, optionalAsync, undefinedable and undefinedableAsync for undefined default value (issue #878)

  • Change type signature of partialCheck and partialCheckAsync action to add .pathList property in a type-safe way

  • Change type signature of findItem action to support type predicates (issue #867)

  • Change validation of missing object entries in looseObject, looseObjectAsync, object, objectAsync, objectWithRest, objectWithRestAsync, strictObject and strictObject (PR #1013)

  • Change type signature of optional and optionalAsync when used within an object schema (PR #1013)

  • Change MarkOptional type to fix order of entries and TS error when using generic schemas (issue #1021)

  • Change VariantOption and VariantOptionAsync type to fix TS error when using generic schemas (issue #842)

  • Change implementation of variant and variantAsync to support optional discriminators using exactOptional, exactOptionalAsync, optional, optionalAsync, nullish or nullishAsync

  • Change _addIssue to not ignore empty strings as error message (pull request #1065)

  • Change ISO_DATE_TIME_REGEX and ISO_TIMESTAMP_REGEX to support space as separator (pull request #1064)

  • Change pipe tuple of pipe and pipeAsync to be readonly by default

  • Change forward, forwardCheck, partialCheck and partialCheckAsync to improve TypeScript performance (issue #987)

  • Change DECIMAL_REGEX to support floats that start with a dot (pull request #1086)

  • Change exports to export only public types to reduce noise

  • Refactor bytes, maxBytes, minBytes and notBytes action

  • Fix implementation of nonOptional, nonOptionalAsync, nonNullable, nonNullableAsync, nonNullish and nonNullishAsync schema in edge cases (issue #909)

  • Fix instantiation error for any in PathKeys type (issue #929)

  • Fix TypeScript error of keyof method for objects with many keys (pull request #988)

  • Fix options filtering in enum_ schema (pull request #941)

  • Fix partialCheck and partialCheckAsync action for typed data with issues