title: Access to required fields with Yup
body: <p>I use react-hook-form with yup to validate my forms.</p>
  <p>I want to know all required fields of a schema to display some information in form (like '*' for required fields).
  We could achieve this with this line of code :</p>
  <p><code>schema.describe().fields[field].tests.findIndex(({ name }) =&gt; name === 'required'</code></p>
  <p>However, this code doesn't work for conditional validation.</p>
  <p>Schema example :</p>
  <pre><code>const schema = yup.object().shape({
      email: yup
      .string()
      .email()
      .required(),
  
      isProfileRequired: yup
      .boolean(),
  
      profile:  yup
      .object()
      .when('isProfileRequired',{
          is: (isProfileRequired) =&gt; isProfileRequired,
          then:
              yup
              .object()
              .nullable()
              .required()
      })
  })
  </code></pre>
  <p>Is there a way to retrieve this informations within the form ?</p>