Formik: submitForm promise not rejected when form is invalid

Created on 11 Sep 2019  路  1Comment  路  Source: formium/formik

馃悰 Bug report

Current Behavior

submitForm returns a promise that is resolved even when the validation fails.

Expected behavior

According to documentation,

Trigger a form submission. The promise will be rejected if form is invalid.

Reproducible example

https://codesandbox.io/embed/formik-codesandbox-template-230c0

Suggested solution(s)

Reject the promise if the form is invalid.

Your environment

| Software | Version(s) |
| ---------------- | ---------- |
| Formik | 1.5.7 |
| React | 16.8.6 |
| Browser | Google Chrome version 76.0.3809.132 |
| npm/Yarn | yarn version 1.17.3 |
| Operating System | macOS Mojave version 10.14.6 (18G95) |

Most helpful comment

I have the same issue. Any update on reviewing / merging (6daef57)

>All comments

I have the same issue. Any update on reviewing / merging (6daef57)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

najisawas picture najisawas  路  3Comments

jordantrainor picture jordantrainor  路  3Comments

emartini picture emartini  路  3Comments

Jucesr picture Jucesr  路  3Comments

PeerHartmann picture PeerHartmann  路  3Comments