title: How to validate a form with yup and formik?
body: <p>I have a form with schema like this.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>validationSchema: Yup.object({
        date: Yup.string()
          .required("Required!"),
        time: Yup.string()
          .required("Required!")
  })</code></pre>
  </div>
  </div>
  </p>
  <p>I need to validate whether this form is used to set a new date or update an existing date.</p>
  <p>If the form is used to update an existing date, I want to notify the user if they can't change the time 30 minutes before or 30 minutes after from the preset time.</p>
  <p>For example, if preset time is 8AM.
  User can't change time to 7:30 or 8:30</p>