joi icon indicating copy to clipboard operation
joi copied to clipboard

alternative.match errors should provide details of what caused the error

Open nlundquist opened this issue 3 years ago • 0 comments

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

nlundquist avatar Mar 11 '21 17:03 nlundquist