(valid-single? data schema)
Analogous function to valid?
that just validates single value.
Analogous function to `valid?` that just validates single value.
(valid? data schema)
Return true if the data matches the schema, otherwise return false.
Return true if the data matches the schema, otherwise return false.
(validate message-fn data schema)
(validate message-fn data schema {:keys [strip] :or {strip false} :as opts})
Validate data with specified schema.
This function by default strips all data that does not defined in
schema, but this behavior can be changed passing {:strip false}
as third argument.
Validate data with specified schema. This function by default strips all data that does not defined in schema, but this behavior can be changed passing `{:strip false}` as third argument.
(validate! data schema)
(validate! data
schema
{: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 :message
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 `:message` that serves for customize the exception message.
(validate-single message-fn data schema)
(validate-single message-fn data schema opts)
A helper that used just for validate one value.
A helper that used just for validate one value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close