Open ozum opened 6 years ago
Unfortunately it may not be possible to do this. The reason is, through extend
we are supposed to use createError
or createOverrideError
to return an error. This returns a single error...
If we want to have multiple errors then we need access to Error.process(errors, ...)
and this is not exposed AFAIK.
When used with
allOf
,abortEarly
does not work. I suppose it is related to Joi extension forallOf
.I pasted a minimal sample code below:
Example Code
Actual Result
result.error
has single error.result2.error
has multiple errors.Expected Result
result.error
has multiple error.result2.error
has multiple errors.Kind Regards,