(validate schema data)
(validate schema data opts)
Validate data with specified schema.
This function by default strips all data that are not defined in
schema, but this behavior can be changed by passing {:strip false}
as third argument.
Validate data with specified schema. This function by default strips all data that are not defined in schema, but this behavior can be changed by passing `{:strip false}` as third argument.
(validate! schema data)
(validate! schema
data
{:keys [message] :or {message "Schema validation error"} :as opts})
Analogous function to the validate
that instead of return
the errors, just raise a ex-info exception with errors in case
them are or just return the validated data.
This function accepts the same parameters as validate
with
an additional :msg
that serves for customize the exception
message.
Analogous function to the `validate` that instead of return the errors, just raise a ex-info exception with errors in case them are or just return the validated data. This function accepts the same parameters as `validate` with an additional `:msg` that serves for customize the exception message.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close