Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Question message for an item in an array #27

Open
jberall opened this issue Dec 6, 2018 · 0 comments
Open

Question message for an item in an array #27

jberall opened this issue Dec 6, 2018 · 0 comments
Labels

Comments

@jberall
Copy link

jberall commented Dec 6, 2018

data: Joi.array().items({
Joi.object({
foo: Joi().string().required()
})
});

How can I set a specific message for foo?
'data.0.foo': 'Message works for specific index'
'data.?.foo': 'For all array instances?'

Thanks,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants