Skip to content

Commit

Permalink
Update change log and readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Devin Lyons committed Mar 14, 2022
1 parent 59eb5d4 commit 445b910
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Revision history for fsharp-data-validation

## Unreleased Changes
## 1.0.0 - 03/14/2022

* First version. Released on an unsuspecting world.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
- [The `isInvalid` Helper](#the-isinvalid-helper)
- [The `flattenProofs` Helper](#the-flattenproofs-helper)
- [The `raiseIfInvalid` Helper](#the-raiseifinvalid-helper)
- [Proof Helpers](#proof-helpers)
- [`toResult` Helper](#toresult-helper)
- [`toValidationFailures` Helper](#tovalidationfailures-helper)
- [Data-Validation Library for Haskell](#data-validation-library-for-haskell)

## Getting Started
Expand Down Expand Up @@ -1506,6 +1509,18 @@ If the value is `Valid`, it is transformed to `'A`.
Otherwise, an `InvalidProofException` is raised with the given message.
This is useful when we are receiving data that you know to be valid, such as from a database, and know that validation will succeed.

## Proof Helpers

There are helper functions for the `Proof` type to make it easier to work with.

### `toResult` Helper

The `toResult` helper converts a `Proof<'F,'A>` value to a `Result<'A,ValidationFailures<'F>>`.

### `toValidationFailures` Helper

If you are only interested in the failures, you can use the `toValidationFailures` function to convert a `Proof<'F,'A>` to a `Option<ValidationFailures<'F>>`.

## Data-Validation Library for Haskell

This library is based on our original library for [Haskell](https://www.haskell.org/).
Expand Down

0 comments on commit 445b910

Please sign in to comment.