Skip to content

Ref for arrays #374

@floatdrop

Description

@floatdrop

I'm not sure, but it seems to me, that ref code does not contain any method to access array properties.

What I want to achieve, is reference first element of array through reference like this: name[0].

Am I missing something in documentation or this is not implemented yet?

P.s. current workaround for me is to write code like this:
joi.assert('name', Joi.array().includes(obj[i])), but it can be shorter:
joi.assert('name[0]', obj[i])

Metadata

Metadata

Assignees

Labels

supportQuestions, discussions, and general support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions