title: Joi - validate property against value in array of objects
body: <p>Im trying to validate a value of a particular property in a payload against a defined array of objects.</p>
  
  <p>for example</p>
  
  <p>payload</p>
  
  <pre><code>{
      a:[1, 2]
  }
  </code></pre>
  
  <p>the value of "a" must be a one of the id defined in a array of objects (multiple values allowed) </p>
  
  <pre><code>[
          {
              "id":1,
              "share":{
                  "x":100,
                  "y":0,
                  "z":0
              }
          },
          {
              "id":2,
              "share":{
                  "x":90,
                  "y":0,
                  "z":10
              }
          }
          ....and so on
  ]
  </code></pre>
  
  <p>Could you please help advising if this can be achieved with Joi?</p>
  
  <p>Thanks, Gowrish</p>