title: validate.js validating array elements
body: <p>I have a java script object that contains two array properties:</p>
  
  <p>I'm using the <a href="https://validatejs.org/#validate-js" rel="noreferrer">validate.js</a> library.</p>
  
  <p>For example:</p>
  
  <pre><code>var customer = {
     name: 'Ted',
     address: 'some address',
     friends: ['Michelle','Elon'],
     purchases: [{ qty:1, goods: 'eggs'}, { qty:2, goods: 'apples'}]
  }
  </code></pre>
  
  <p>I want to validate the following:</p>
  
  <ol>
  <li>That the array of friends contains only elements of type string.</li>
  <li>That the array of purchases contains at least 1 purchase but max 5 purchases and that the qty is always numeric.</li>
  </ol>
  
  <p>How can i do that with validate.js?</p>