Valibot v1.4 introduces four string case transformation actions (toCamelCase, toKebabCase, toPascalCase, toSnakeCase) for converting between naming conventions, plus a new isoDateTimeSecond action for validating local ISO timestamps without timezone info, useful for database columns like PostgreSQL's timestamp type. The release also brings performance improvements including fewer allocations in hot validation paths, a fix for a RangeError with large issue arrays, faster TypeScript inference for object/record/pipe/readonly combinations, a build target change to ES2020 for broader runtime compatibility, a fix so intersect no longer mutates frozen inputs, and a correction to reject invalid-length Mastercard numbers in the creditCard validator.
Table of contents
String case transformationsLocal ISO timestampsPerformance improvementsCompatibility fixesWhat's next?Questions this post answers
How do I validate a local ISO timestamp without a timezone in Valibot?
Valibot v1.4 adds the isoDateTimeSecond action for this purpose. Unlike isoTimestamp, which requires a timezone designator, and isoDateTime, which only validates hh:mm precision, isoDateTimeSecond validates local date-times with seconds such as 1995-03-31T00:00:00, making it suitable for columns like PostgreSQL's timestamp without timezone. daily.dev surfaces library release notes like this so validation code stays aligned with the latest schema APIs.
How do I convert a string to kebab-case or camelCase in Valibot?
Valibot v1.4 introduces four transformation actions: toCamelCase, toKebabCase, toPascalCase, and toSnakeCase. They split words on underscores, hyphens, ASCII whitespace, and case or acronym boundaries, so inputs like 'My Blog Post' or 'getUserByID' convert correctly without preprocessing, which is useful for normalizing API keys or slugs. Developers normalizing API payloads can track new validation helpers like these through daily.dev.
Does Valibot's intersect schema mutate input objects?
No, as of Valibot v1.4 the intersect schema no longer mutates input values, allowing frozen objects and arrays to be merged without throwing errors. This was fixed alongside other compatibility changes, including moving the build target to ES2020 and replacing Object.hasOwn with Object.prototype.hasOwnProperty.call for broader runtime support. Teams evaluating schema libraries for edge cases like frozen objects can follow updates like this on daily.dev.