Defines data structure, coerces, validates.
Defines data structure, coerces, validates.
(->boolean value)
(->date v)
(->float v)
(->int v)
(->keyword value)
(->seq v)
(->string value)
(->uri v)
(->uuid v)
(build-coersion spec)
(build-validator 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-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)
(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, true otherwise. Does the work.
throws an exception when validation fails, true otherwise. Does the work.
(validate-value spec value)
(validate-value schema key value)
return true or falue
return true or falue
(validate-value! spec value)
(validate-value! schema key value)
throws an exception when validation fails, true otherwise
throws an exception when validation fails, true otherwise
(validation-errors schema entity)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close