joi
joi copied to clipboard
alternative.match errors should provide details of what caused the error
Support plan
- is this issue currently blocking your project? (yes/no): no
- is this issue affecting a production system? (yes/no): yes
Context
- node version: 14
- module version: 17.x
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): standalone
- any other relevant information:
What problem are you trying to solve?
Errors returned during an alternative match mode validation do not describe why the failure occurred.
'any' & 'all' should return all of the underlying property validation failures that prevented a match from occurring.
one
should return which subschema indexes succeeded matching in addition to any failures, so users can tell which matches occurred when only one should've.
Partially resolved in #2577