Liking cljdoc? Tell your friends :D

barista-clj.middlewares.humanize-errors


explainclj

(explain errors)
(explain errors translator)

Takes an error object as returned from schema an transforms each leaf value of either

  1. NamedError
  2. ValidationError Such that it is 'explained' (like schema's explain) but additionally turns the results into vectors. Optionally takes a translator if you want the NamedErrors & ValidationErrors explained in a humanized form.
Takes an error object as returned from schema an transforms each leaf value of either
1. NamedError
2. ValidationError
Such that it is 'explained' (like schema's explain) but additionally
turns the results into vectors.
Optionally takes a translator if you want the NamedErrors & ValidationErrors explained
in a humanized form.
raw docstring

humanizeclj

(humanize x)

Returns a human explanation of a SINGLE error. This is for errors which are from USER input. It is not for programming errors. If the error is a map/vector then this function must be applied to each of those values. You should adapat this function for your own custom errors. This is just an example. Don't actually use this function. Define it in your business logic and pass it in to the check function.

Returns a human explanation of a SINGLE error.
This is for errors which are from USER input. It is not for programming errors.
If the error is a map/vector then this function must be applied to each of those
values.
You should adapat this function for your own custom errors.
This is just an example. Don't actually use this function.
Define it in your business logic and pass it in to the check function.
raw docstring

humanize-errors-handlerclj

(humanize-errors-handler e data request)

symbol-patternclj

(symbol-pattern regular-expression)

vectorizeclj

(vectorize x)

Recursively transforms all seq in m to vectors. Because maybe you want to use core.match with it.

Recursively transforms all seq in m to vectors.
Because maybe you want to use core.match with it.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close