Liking cljdoc? Tell your friends :D

dev.skivi.validation.core


composite-validatorclj

(composite-validator validators)

Creates a validator that applies validators in order, threading payload through each.

Creates a validator that applies validators in order, threading payload through each.
sourceraw docstring

create-validatorclj

(create-validator config)

Creates a validator from config. Reads [:schema :job-schemas], partitioning entries by value type: keyword values are treated as clojure.spec spec names, all other values are treated as malli schemas. Returns a no-op validator when :validate-payloads is false or no schemas are defined.

Creates a validator from config. Reads [:schema :job-schemas], partitioning
entries by value type: keyword values are treated as clojure.spec spec names,
all other values are treated as malli schemas. Returns a no-op validator when
:validate-payloads is false or no schemas are defined.
sourceraw docstring

malli-validatorclj

(malli-validator schemas)

Creates a validator that uses malli schemas keyed by task-identifier keyword.

Creates a validator that uses malli schemas keyed by task-identifier keyword.
sourceraw docstring

noop-validatorclj

(noop-validator)

Creates a no-op validator that accepts all payloads without validation.

Creates a no-op validator that accepts all payloads without validation.
sourceraw docstring

PayloadValidatorcljprotocol

Protocol for validating job payloads against task-specific schemas.

Protocol for validating job payloads against task-specific schemas.

explain-payloadclj

(explain-payload this task-identifier payload)

Returns nil if payload is valid, or a humanised error map otherwise.

Returns nil if payload is valid, or a humanised error map otherwise.

valid-payload?clj

(valid-payload? this task-identifier payload)

Returns true if payload is valid for task-identifier, false otherwise.

Returns true if payload is valid for task-identifier, false otherwise.

validate-payloadclj

(validate-payload this task-identifier payload)

Validates payload for task-identifier. Returns payload on success, throws ex-info with :task-identifier, :errors, and :payload keys on failure.

Validates payload for task-identifier. Returns payload on success, throws
ex-info with :task-identifier, :errors, and :payload keys on failure.
sourceraw docstring

spec-validatorclj

(spec-validator specs)

Creates a validator that uses clojure.spec specs keyed by task-identifier keyword.

Creates a validator that uses clojure.spec specs keyed by task-identifier keyword.
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