Allow object merging for optional
Author: floratminCreated Aug 24, 2026Updated Aug 24, 2026
Labelsquestion
When I have two objects, I can merge them with
const mergedObject = v.object({
...object1.entries,
...object2.entries,
});But as soon as one of these objects is wrapped in optional, the schema does have an entries key.
Source: open-circle/valibot