hapijs / hapijs/joi

When using Joi.alternatives().try(schema1, schema2), Error message have no clue that which property is missing

Open
#2,946 0 comments 2 reactions 0 assignees View on GitHub
support
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):
* *is this issue affecting a production system?* (no):

#### Context

* *node version*: 18.15.0
* *module version*: joi(17.9.2)
* *environment* (e.g. node, browser, native): node(18.15.0)
* *used with* (e.g. hapi application, another framework, standalone, ...): nestjs
* *any other relevant information*:

#### How can we help?

When using Joi.alternatives().try(schema1, schema2), Can I have a clue that which property is missing like using one Object Schema

```js
Joi.alternatives().try(schema1, schema2)
```

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.