Liking cljdoc? Tell your friends :D

turvata.schema


assert-valid!clj

(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.
sourceraw docstring

coerceclj

(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.
sourceraw docstring

decode-transformerclj

Decodes common string values ("42"→42, "true"→true).

Decodes common string values ("42"→42, "true"→true).
sourceraw docstring

ends-with-extclj

(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.
sourceraw docstring

ends-with?clj

(ends-with? ext)

Returns a predicate (string? && ends-with ext).

Returns a predicate (string? && ends-with ext).
sourceraw docstring

NonBlankStringclj

source

NonNegIntegerclj

source

PosIntegerclj

source

relative-uri?clj

(relative-uri? s)
source

RelativeURIclj

source

Settingsclj

source

SettingsInclj

source

validateclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close