You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will think about it. At the moment I prefer strong primitives over specialized functions. Also, I don't want there to be too many ways to achieve the same things within a library, because that makes usage confusing in my eyes.
Hey 馃憢
I'm porting my projects to use
valibot
instead ofzod
and would love to have some kind of passthrough object schema.My use case:
I'm validating API requests with lots of nested objects and want to keep unknown props while validating the ones in schema.
With
rest
object param I can do it this way:It works great.
However with nested objects it becomes hard to track this objects, for example:
Nested object example
For me it's quite hard to track such objects, check any missing
unknown()
rest types, add new objects 馃槩zod
haspassthrough()
method with pending feature request to have global method.Feature request
Imagine having a simple type for this in
valibot
. Just compare:Proposed api example
It's so clean, easy to follow, add, change, etc. It can also have a different name.
Please help reduce the pain of validating such nested objects, I pray for this feature for years 馃檹
The text was updated successfully, but these errors were encountered: