title: Yup: Validate String Array with Single Element which must be 'Y'
body: <p>I need to validate the following structure:</p>
  <pre><code>&quot;cert1&quot; : [
     &quot;Y&quot;
  ]
  </code></pre>
  <p>It's a single &quot;Acknowledge Term/Condition&quot; checkbox. This must be provided at all times (required). But the following Yup expressions don't work:</p>
  <pre><code>cert1: yup.array().of(yup.string().matches(/^Y$/, &quot;The selection must be Yes&quot;))
  
  cert1: yup.array().of(yup.string().matches(/^Y$/, &quot;The selection must be Yes&quot;).required('Required'))
  </code></pre>
  <p>When the checkbox is not selected, I'm able to submit the form without it.</p>