-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
When an error is found in a nested value of an array, it would be great if the details.path gave the full path to the error instead of just the top level path.
// joi schema
…
products: joi.array().includes(joi.object({
plans: joi.array().includes(joi.object({
features: joi.array().includes(joi.object({
value: joi.number()
}))
}))
…// results
details: {
…
message: 'the products array value in position 0 fails because the plans array value in position 0 fails because the features array value in position 0 fails because the value of value must be a number'
, path: 'products' // ← this should be `products[0].plans[0].features[0].value`
…
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement