Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenet committed Oct 7, 2023
1 parent 48abc6f commit b471030
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@ It differs from other similar libraries in that the focus is more on
lingo without its error rendering facilities in order to just infer more
information about your errors.

Internally building this data is done via transducers that are run against the
explain-data problems. It's quite easy to pull this apart and build your own if
you want/need to.
### TLDR

"Rust-lookalike" error messages for spec

```clj
(s/def :foo/t-shirts (s/coll-of :foo/t-shirt))
(s/def :foo/t-shirt (s/keys :req-un [:foo/size :foo/color]))
(s/def :foo/size (s/int-in 1 3))
(s/def :foo/color #{:red :blue :green})

(exoscale.lingo/explain :foo/t-shirts [{:size 5 :color :pink}])
```
<img src="example.png" width="80%">

## Installation

Expand Down

0 comments on commit b471030

Please sign in to comment.