Liking cljdoc? Tell your friends :D

c3kit.apron.schema

Defines data structure, coerces, validates.

Defines data structure, coerces, validates.
raw docstring

->bigdecclj/s

(->bigdec v)

->booleanclj/s

(->boolean value)

->dateclj/s

(->date v)

->floatclj/s

(->float v)

->intclj/s

(->int v)

->keywordclj/s

(->keyword value)

->seqclj/s

(->seq v)

->stringclj/s

(->string value)

->uriclj/s

(->uri v)

->uuidclj/s

(->uuid v)

-coerce-value!clj/s

(-coerce-value! coerce-fn value ?seq)

bigdec?clj/s

(bigdec? v)

build-coersionclj/s

(build-coersion spec)

coerceclj/s

(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.
raw docstring

coerce!clj/s

(coerce! schema entity)

coerce-exclj/s

(coerce-ex v type)

coerce-ex?clj/s

(coerce-ex? e)

coerce-valueclj/s

(coerce-value spec value)
(coerce-value schema key value)

returns coerced value or throws an exception

returns coerced value or throws an exception
raw docstring

conformclj/s

(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.
raw docstring

conform!clj/s

(conform! schema entity)

conform-all!clj/s

(conform-all! schema entities)

conform-errorsclj/s

(conform-errors schema entity)

conform-valueclj/s

(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
raw docstring

dateclj/s


email-patternclj/s


email?clj/s

(email? value)

error-message-mapclj/s

(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>} .
raw docstring

error?clj/s

(error? result)

exmessageclj/s

(exmessage e)

idclj/s


is-enum?clj/s

(is-enum? enum)

kindclj/s

(kind key)

make-errorclj/s

(make-error errors schema before after)

messagesclj/s

(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.
raw docstring

nil-orclj/s

(nil-or f)

omitclj/s

Used as a :present value to remove the entry from presentation

Used as a :present value to remove the entry from presentation
raw docstring

parse!cljs

(parse! f v)

presentclj/s

(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.
raw docstring

present!clj/s

(present! schema entity)

present-valueclj/s

(present-value spec value)
(present-value schema key value)

returns a presentable representation of the value

returns a presentable representation of the value
raw docstring

present?clj/s

(present? v)

result-or-exclj/s

(result-or-ex f spec value)

SchemaErrorclj/s


stdexclj/s


str-or-nilclj/s

(str-or-nil v)

type-coercer!clj/s

(type-coercer! type)

type-coercersclj/s


type-validator!clj/s

(type-validator! type)

type-validatorsclj/s


uri?clj/s

(uri? value)

valid-value?clj/s

(valid-value? spec value)
(valid-value? schema key value)

return true or false

return true or false
raw docstring

validateclj/s

(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.
raw docstring

validate!clj/s

(validate! schema entity)

validate-coerced-value!clj/s

(validate-coerced-value! spec value coerced)

throws an exception when validation fails, value otherwise.

throws an exception when validation fails, value otherwise.
raw docstring

validate-value!clj/s

(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
raw docstring

validation-errorsclj/s

(validation-errors schema entity)

without-exclj/s

(without-ex result)

replace exceptions with ex-data

replace exceptions with ex-data
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close