hapijs / hapijs/joi

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

Open
#2,578 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
21.2k
Forks
1.5k
Avg merge
4h 57m
Merged PRs (30d)
14

Description

#### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.