Defines data structure, coerces, validates.
Defines data structure, coerces, validates.
(->bigdec v)
(->boolean value)
(->date v)
(->float v)
(->int v)
(->keyword value)
(->seq v)
(->string value)
(->uri v)
(->uuid v)
(-coerce-value! coerce-fn value ?seq)
(bigdec? v)
(build-coersion spec)
(coerce schema entity)
Returns coerced entity or SchemaError if any coersion failed. Use error? to check result.
Returns coerced entity or SchemaError if any coersion failed. Use error? to check result.
(coerce! schema entity)
(coerce-ex v type)
(coerce-ex? e)
(coerce-value spec value)
(coerce-value schema key value)
returns coerced value or throws an exception
returns coerced value or throws an exception
(conform schema entity)
Returns coerced entity or SchemaError upon any coersion or validation failure. Use error? to check result.
Returns coerced entity or SchemaError upon any coersion or validation failure. Use error? to check result.
(conform! schema entity)
(conform-all! schema entities)
(conform-errors schema entity)
(conform-value spec value)
(conform-value schema key value)
coerce and validate, returns coerced value or throws
coerce and validate, returns coerced value or throws
(email? value)
(error-message-map result)
Nil when there are no errors, otherwise a map {<field> <message>} .
Nil when there are no errors, otherwise a map {<field> <message>} .
(error? result)
(exmessage e)
(is-enum? enum)
(kind key)
(make-error errors schema before after)
(messages result)
Sequence of error messages in a validate/coerce/conform result; nil if none.
Sequence of error messages in a validate/coerce/conform result; nil if none.
(nil-or f)
Used as a :present value to remove the entry from presentation
Used as a :present value to remove the entry from presentation
(parse! f v)
(present schema entity)
Returns presentable entity or SchemaError upon any presentation failure. Use error? to check result.
Returns presentable entity or SchemaError upon any presentation failure. Use error? to check result.
(present! schema entity)
(present-value spec value)
(present-value schema key value)
returns a presentable representation of the value
returns a presentable representation of the value
(present? v)
(result-or-ex f spec value)
(str-or-nil v)
(type-coercer! type)
(type-validator! type)
(uri? value)
(valid-value? spec value)
(valid-value? schema key value)
return true or false
return true or false
(validate schema entity)
Returns entity with all values true, or SchemaError when one or more invalid fields. Use error? to check result.
Returns entity with all values true, or SchemaError when one or more invalid fields. Use error? to check result.
(validate! schema entity)
(validate-coerced-value! spec value coerced)
throws an exception when validation fails, value otherwise.
throws an exception when validation fails, value otherwise.
(validate-value! spec value)
(validate-value! schema key value)
throws an exception when validation fails, value otherwise
throws an exception when validation fails, value otherwise
(validation-errors schema entity)
(without-ex result)
replace exceptions with ex-data
replace exceptions with ex-data
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close