title: Yup, how to validate one variable against a function of several other ones?
body: <p>I'm trying to implement a yup validation schema and lets say I have five numeric values (A, B, C, D, E)</p>
  <p>I want D and E be less than a math function based on A,B,C and some constant value. Something like this:</p>
  <pre><code>const upperBound = Math.min(A,B,C)-10;
  if((D &gt; upperBound) || (E &gt; upperBound))
      return FAIL;
  else
      return PASS;
  </code></pre>
  <p>I have reviewed many threads on SO but none of them address multiple variable dependency.
  Thanks.</p>