Skip to content

array().single() #498

@hueniverse

Description

@hueniverse

A different take on #474

Allows an array value to pass if the value would be a valid array element. It conversion is enabled, turns the item into an array. Joi.array().includes(Joi.number()).single() will match [1] and 1 and will result in [1] in both cases.

Metadata

Metadata

Assignees

Labels

featureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions