title: Yup validation based on another non-required field
body: <p>I'm building a form in React using Formik and React-bootstrap and I'm using Yup to validate the form.</p>
  
  <p>I have 2 fields, let's say FieldA and FieldB. FieldA is not required but FieldB is required if FieldA is not empty.</p>
  
  <p>FieldA is a textbox while FieldB is multiple select. My validation rule for FieldB must be:</p>
  
  <pre><code>FieldA !=='' ? FieldB is required : do nothing
  </code></pre>