Liking cljdoc? Tell your friends :D
All platforms.

bling.explain


explain-malliclj/s

(explain-malli schema v)
(explain-malli schema
               v
               {:keys [spacing success-message highlighted-problem-section-label
                       section-body-indentation omit-section-labels
                       omit-sections select-keys-in-problem-path?
                       preamble-section-label preamble-section-body
                       surround-disjunctor-with-tilde? highlight-missing-keys?
                       display-schema? display-explain-data? file-info-str
                       callout-opts]
                :or {success-message :bling.explain/explain-malli-success}
                :as opts})

Prints a Malli validation error "callout" block via bling.core/callout.

Within the block, the value is pretty-printed, potentially with syntax coloring. The problem value is highlighted with the :highlight-error class of the active fireworks theme, or the :highlight-error-underlined class, if the value is not a collection.

If three arguments are provided, the third should be a map with the following optional keys:

  • :function-name

    • string?
    • Optional.
    • The name of the function that can be used to construct the source location.
  • :file

    • [:or :pos-int :string]
    • Optional.
    • The file name that can be used to construct the source location.
  • :line

    • [:or :pos-int :string]
    • Optional.
    • The line number that can be used to construct the source location.
  • :column

    • [:or :pos-int :string]
    • Optional.
    • The column number that can be used to construct the source location.
  • :spacing

    • #{:compact "compact"}
    • Optional.
    • If the value of :spacing is set to :compact, the callout is compacted vertically.
  • :display-schema?

    • boolean?
    • Optional.
    • Displays the schema passed to the underlying call to malli.core/explain.
  • :display-explain-data?

    • boolean?
    • Optional.
    • Displays the output of malli.core/explain within the callout block.
  • :callout-opts

    • map?
    • Optional.
    • A map of options for the underlying call to bling.core/callout.
Prints a Malli validation error "callout" block via bling.core/callout. 

Within the block, the value is pretty-printed, potentially with syntax coloring. The problem value is highlighted with the `:highlight-error` class of the active fireworks theme, or the `:highlight-error-underlined` class, if the value is not a collection.

If three arguments are provided, the third should be a map with the following optional keys:

* **`:function-name`**
    - `string?`
    - Optional.
    - The name of the function that can be used to construct the source location.

* **`:file`**
    - `[:or :pos-int :string]`
    - Optional.
    - The file name that can be used to construct the source location.

* **`:line`**
    - `[:or :pos-int :string]`
    - Optional.
    - The line number that can be used to construct the source location.

* **`:column`**
    - `[:or :pos-int :string]`
    - Optional.
    - The column number that can be used to construct the source location.

* **`:spacing`**
    - `#{:compact "compact"}`
    - Optional.
    - If the value of `:spacing` is set to `:compact`, the callout is compacted vertically.

* **`:display-schema?`**
    - `boolean?`
    - Optional.
    - Displays the schema passed to the underlying call to `malli.core/explain`.

* **`:display-explain-data?`**
    - `boolean?`
    - Optional.
    - Displays the output of `malli.core/explain` within the callout block.

* **`:callout-opts`**
    - `map?`
    - Optional.
    - A map of options for the underlying call to bling.core/callout.
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