title: Joi Array validation unable to cast to array
body: <p>I am using <code>Joi</code> for schema validation. I have an array of object's that i want to be validated with <code>Joi</code>. Here is the code:</p>
  
  <pre><code>const joi = require("joi");
  
  function validateUser(user) {
    let phone = joi.object().keys({
      id: joi.string().required(),
      phoneNumber: joi.string().required()
    });
  
    const schema = {
      firstName: joi.string().required(),
      lastName: joi.string().required(),
      email: joi
        .string()
        .email()
        .required(),
      phoneNumbers: joi.array().items(phone)
    };
  
    return joi.validate(user, schema).error;
  }
  </code></pre>
  
  <p>This is the <code>user</code> object that i am passing to <code>validateUser</code> function.</p>
  
  <pre><code>{
    firstName: 'User',
    lastName: 'One',
    email: 'userone@gmail.com'
    phoneNumbers: [
      {
        id: '03bb22cc-499a-4464-af08-af64d5a52675',
        phoneNumber: '13001234567'
      },
      {
        id: '50e32458-756b-4aaa-b3dc-19a2f696ab6c',
        phoneNumber: '13031234567'
      }
    ]
  }
  </code></pre>
  
  <p>But, it is showing me the following error. </p>
  
  <pre><code>UnhandledPromiseRejectionWarning: ValidationError: user validation failed: phoneNumbers: Cast to Array failed for value "[
    {
      id: '03bb22cc-499a-4464-af08-af64d5a52675',
      phoneNumber: '13001234567'
    },
    {
      id: '50e32458-756b-4aaa-b3dc-19a2f696ab6c',
      phoneNumber: '13031234567'
    }
  ]" at path "phoneNumbers"
  </code></pre>
  
  <p>I don't know what is happening here. Could you please propose a solution to this?</p>