-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general support
Milestone
Description
Wondering if there's a simple approach here that I'm missing, maybe some part of the API designed to serve a use case like mine. Validation for the array in question should work like this:
- The array must have at least one value (
.required()✅) - Each array item must be an object of a given shape (
.items()✅) - One of the array items must have a value from a list as it's
nameproperty value
Because there is only one shape for the objects in the array, we enjoy the ability to provide detailed error messages about how an individual object in the array failed. If we use a second item definition, errors become the generic does not match any of the allowed types.
Is there any way to validate as described without losing specific error messaging for the objects in the array?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general support