(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.
(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.
(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.
(noop-validator)Creates a no-op validator that accepts all payloads without validation.
Creates a no-op validator that accepts all payloads without validation.
Protocol for validating job payloads against task-specific schemas.
Protocol for validating job payloads against task-specific schemas.
(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? 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-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.
(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.
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 |