the following results in an error. i'm trying to get it to determine if foo is one of 'bar', 'baz', or 'quux'. context.fooType is determined dynamically at runtime and passed into the validation.
var obj = { foo: 'bar' }
var schema = Joi.object({ foo: Joi.any().valid('$fooTypes') })
Joi.validate(data, schema, { context: { fooTypes: [ 'bar', 'baz', 'quux' ] } })
is there a way to accomplish this?