hapijs / hapijs/joi

Multiple ordered with array fails

Open
#2,664 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

#### How can we help?

This value `['first item', 1, 2, 3, 'last item']` for the following schema fails but it should pass. The schema requires 'first item' followed by 1 or more numbers, ending with 'last item'.

```js
Joi.array()
.ordered(Joi.valid('first item'))
.items(Joi.number())
.ordered(Joi.valid('last item'))
```

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.