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: Expose format errors functions #33

Merged
merged 2 commits into from
Jun 25, 2020

Conversation

gillchristian
Copy link
Owner

This PR fixes the breaking change introduced in #17 (#17 (review)).

Also exports a Reporter as default (see: https://gcanti.github.io/io-ts/modules/PathReporter.ts.html) and a short example in the README.md

@hasparus
Copy link

This formatValidationErrors is way better than the one I was using!

import { compact } from "fp-ts/lib/Array";
import { Errors } from "io-ts";
import { formatValidationError } from "io-ts-reporters";

export const formatValidationErrors = (errors: Errors) =>
  compact(errors.map(formatValidationError));

Thanks! 🙏

@gillchristian gillchristian merged commit 2ca6009 into master Jun 25, 2020
@gillchristian gillchristian deleted the fix/expose-format-function-again branch June 25, 2020 11:48
@gillchristian
Copy link
Owner Author

@hasparus released on v1.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants