Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation for withFormik async validate method #2122

Merged
merged 2 commits into from
Dec 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix documentation for withFormik async validate method
  • Loading branch information
mistadikay committed Dec 13, 2019
commit 04f64c29fd6ede2b7abae7001fe6dafa09cd0a20
6 changes: 2 additions & 4 deletions docs/api/withFormik.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const validate = (values, props) => {
};
```

- Asynchronous and return a Promise that's error is an `errors` object
- Asynchronous and return a Promise that's resolves to an object containing `errors`

```js
// Async Validation
Expand All @@ -190,9 +190,7 @@ const validate = (values, props) => {
errors.username = 'Nice try';
}
// ...
if (Object.keys(errors).length) {
throw errors;
}
throw errors;
});
};
```
Expand Down