title: Joi schema validation: Joi.object define valid keys from an array
body: <p>I  have a Joi schema like this:</p>
  
  <pre><code>var schema = Joi.object().keys({ filter: Joi.object({ }) })
  </code></pre>
  
  <p>Then I have all valid keys for filter-object in a separate array called validKeys.</p>
  
  <p>I would like to reference validKeys with filter-object. Otherwise I would have to hard code the allowed values like this:</p>
  
  <pre><code>var schema = Joi.object().keys({ filter: Joi.object({ allowed1:Joi.string(), allowed2: Joi.string(), ... }) }) 
  </code></pre>
  
  <p>which I don't want to do. Is  this possible with Joi or some other Javascript tools?</p>