title: Yup: deep validation in array of objects
body: <p>I have a data structure like this:</p>
  
  <pre><code>{
    "subject": "Ah yeah",
    "description": "Jeg siger...",
    "daysOfWeek": [
      {
        "dayOfWeek": "MONDAY",
        "checked": false
      },
      {
        "dayOfWeek": "TUESDAY",
        "checked": false
      },
      {
        "dayOfWeek": "WEDNESDAY",
        "checked": true
      },
      {
        "dayOfWeek": "THURSDAY",
        "checked": false
      },
      {
        "dayOfWeek": "FRIDAY",
        "checked": false
      },
      {
        "dayOfWeek": "SATURDAY",
        "checked": true
      },
      {
        "dayOfWeek": "SUNDAY",
        "checked": true
      }
    ],
    "uuid": "da8f56a2-625f-400d-800d-c975bead0cff",
    "taskSchedules": [],
    "isInitial": false,
    "hasChanged": false
  }
  </code></pre>
  
  <p>In <code>daysOfWeek</code> I want to ensure that at least one of the items has <code>checked: true</code>.</p>
  
  <p>This is my validation schema so far (but not working):</p>
  
  <pre><code>const taskValidationSchema = Yup.object().shape({
    subject: Yup.string().required('Required'),
    description: Yup.string(),
    daysOfWeek: Yup.array()
      .of(
        Yup.object().shape({
          dayOfWeek: Yup.string(),
          checked: Yup.boolean(),
        })
      )
      .required('Required'),
    taskSchedules: Yup.array(),
  })
  </code></pre>
  
  <p>Is it possible to validate the values of <code>daysOfWeek</code> ensuring that at least one of them has <code>checked: true</code>?</p>