-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Going through the new 6.0 release it looks like the error messages for Array items have actually gotten worse now. So instead of receiving an error such as: value at position 0 fails because value length must be less than or equal to 5 characters long assuming that we have a schema such as:
var schema = Joi.array().includes(Joi.string().min(5).required());Now when we have a schema such as:
var schema = Joi.array().items(Joi.string().min(5).required());The same array being validated which doesn't have the minimum 5 characters just results in an error stating "value" does not contain 1 required value(s). Is there are particular constraint to the change to items() which resulted in these error messages being less useful or do the error messages just need to be enhanced?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect