joi.string().valid(['foo', 'bar']) has been deprecated.
joi.string().valid(['foo', 'bar'])
Error: Method no longer accepts array arguments: allow
What is the new way of achieving this?
Using spread syntax works perfectly!
joi.string().valid(...['foo', 'bar'])