(assert-valid! schema params)Like validate, but throws (ex-info) on error and returns data on success.
Like `validate`, but throws (ex-info) on error and returns data on success.
(coerce schema params)Decode raw (usually stringly) params into typed data using the shared transformer.
Returns the decoded (but not yet validated) map.
Note: also keywordizes map keys. See validate to both coerce & check.
Decode raw (usually stringly) params into typed data using the shared transformer. Returns the decoded (but not yet validated) map. Note: also keywordizes map keys. See `validate` to both coerce & check.
Decodes common string values ("42"→42, "true"→true).
Decodes common string values ("42"→42, "true"→true).
(ends-with-ext ext)Schema form for 'string ending with ext' with a clear error message.
Schema form for 'string ending with ext' with a clear error message.
(ends-with? ext)Returns a predicate (string? && ends-with ext).
Returns a predicate (string? && ends-with ext).
(validate schema params)Coerce + validate in one step. Returns {:ok data} or {:error {:message .. :problems ..}}. Problems are humanized Malli errors suitable for display/logging.
Coerce + validate in one step.
Returns {:ok data} or {:error {:message .. :problems ..}}.
Problems are humanized Malli errors suitable for display/logging.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |