-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
This is easily implemented by chaining my own assertions on top, but I think it's still worth suggesting:
It would be nice if I could pass a custom key type to records, e.g. here in this case I want to limit the length of keys used in a record.
const document = v.object({
services: v.record(
v.object({
type: v.string(),
// ...
}),
v.string()
.assert((input) => input.length <= 32, `service id too long (max 32)`),
),
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels