I'm trying to get errors directly inside **Formik** and log the errors on the console but t it's not working.

1. **Submit function**

```
const submitForms = (errors) => {
    console.log("ERRORS ON SUBMIT", errors);
    handleNext();
  };

```

2. **Attempt to catch errors inside Formik**

```
<Formik
  initialValues={{ ...initialValues }}
  validationSchema={kycFormSchema}
  onSubmit={({errors}) => submitForms(errors)}
 />

```

I'm actually using Yup to validate the form but I also want to catch the errors and pass them in **submitForms** function. Am I missing something?

Thanks in advance.