title: Formik Yup `.test()` custom validation is not working properly
body: <p>I created a custom Yup validation using <code>.test()</code>.</p>
  
  <pre><code>// users is an array of strings
  user: Yup.string().test(
    "user-check",
    "At lease one user should be added",
    () =&gt; users.length &gt; 0
  )
  </code></pre>
  
  <p>The goal is to validate the form when at least one user is added. An input field let you type a username (any string value) then you click a button to add it to a list.</p>
  
  <p>The validation is working well after adding the 2nd username (or adding the 1st one then start typing on the field).
  I'm sharing this live Demo: <a href="https://codesandbox.io/s/hopeful-goldwasser-shpbk" rel="nofollow noreferrer">https://codesandbox.io/s/hopeful-goldwasser-shpbk</a></p>
  
  <p><strong>Steps to reproduce</strong></p>
  
  <ol>
  <li>Click on the text field.</li>
  <li>Type a username.</li>
  <li>Click the red button.</li>
  </ol>
  
  <p><strong>Expected</strong></p>
  
  <ul>
  <li>The form should be valid.</li>
  </ul>
  
  <p><strong>What you'll get</strong></p>
  
  <ul>
  <li>The form is invalid</li>
  </ul>
  
  <p>Any feedback about this strange behavior?</p>
  
  <p><strong>Remark</strong></p>
  
  <ul>
  <li><p>I'm not sure if this is the origin of the problem.</p></li>
  <li><p>The first time you add a user, the validation is called 2 times: the 1st time with an empty <code>users</code> array and then with the correct <code>users</code> value (which is the user you added)!</p></li>
  </ul>