mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
doc: add brief docs for configuring humanized error messages
This commit is contained in:
parent
eb06404f1e
commit
451b286f1d
1 changed files with 13 additions and 0 deletions
|
|
@ -96,3 +96,16 @@ Using `create` with options to create the coercion instead of `coercion`:
|
||||||
;; malli options
|
;; malli options
|
||||||
:options nil})
|
:options nil})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Configuring humanize error messages
|
||||||
|
|
||||||
|
Malli humanized error messages can be configured using `:options :errors`:
|
||||||
|
|
||||||
|
```clj
|
||||||
|
(reitit.coercion.malli/create
|
||||||
|
{:options
|
||||||
|
{:errors (assoc malli.error/default-errors
|
||||||
|
:malli.core/missing-key {:error/message {:en "MISSING"}})}})
|
||||||
|
```
|
||||||
|
|
||||||
|
See the malli docs for more info.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue