Liking cljdoc? Tell your friends :D

dgknght.app-lib.validation


big-dec-not-less-than-zero?clj

source

date-time?clj

source

email?clj

source

error-messagesclj

(error-messages model)
(error-messages model path)

Returns the errors from the specified model. If given only a model, returns a map of all errors. If given a model and a key, returns the errors for the specified key from wihin the model.

Returns the errors from the specified model. If given only a model,
returns a map of all errors. If given a model and a key, returns the
errors for the specified key from wihin the model.
sourceraw docstring

flat-error-messagesclj

(flat-error-messages model)

Returns a flat list of strings describing the error messages for the model instead of the map returned by error-messages

Returns a flat list of strings describing the error messages for the
model instead of the map returned by error-messages
sourceraw docstring

has-error?clj

(has-error? model)
(has-error? model path)

Returns true if the specified model contains validation errors

Returns true if the specified model contains validation errors
sourceraw docstring

length-between?clj

(length-between? min-length max-length value)
source

local-date?clj

source

local-time?clj

source

min-length?clj

(min-length? minimum value)
source

nilable-date-time?clj

source

nilable-local-date?clj

source

nilable-positive-integer?clj

source

nilable-positive-number?clj

source

non-empty-string?clj

source

not-longer-than?clj

(not-longer-than? max-length value)
source

positive-big-dec?clj

source

positive-integer?clj

source

positive-number?clj

source

reg-msgcljmacro

(reg-msg pred msg)
source

reg-path-resolverclj

(reg-path-resolver resolver)
source

reg-speccljmacro

(reg-spec pred {:keys [message path]})
source

spec-dataclj

source

valid?clj

(valid? model)

Returns false if the model has any validation errors

Returns false if the model has any validation errors
sourceraw docstring

validateclj

(validate model spec)

Validates the specified model using the specified spec

Validates the specified model using the specified spec
sourceraw docstring

with-ex-validationcljmacro

(with-ex-validation model spec & body)

Accepts a model and validation rules. If the model passes the rules, the specified body is executed and the result returned. If not, an exception is thrown containing the error details in the ex-data.

Note that this rebinds the validated user object to the same binding used to call the macro.

Accepts a model and validation rules. If the model
passes the rules, the specified body is executed
and the result returned. If not, an exception is
thrown containing the error details in the ex-data.

Note that this rebinds the validated user object
to the same binding used to call the macro.
sourceraw docstring

with-validationcljmacro

(with-validation model spec & body)

Accepts a model and validation rules. If the model passes the rules, the specified body is executed and the result returned. If not, the invalid model, with validation errors, is returned.

Note that this rebinds the validated user object to the same binding used to call the macro.

Accepts a model and validation rules. If the model
passes the rules, the specified body is executed
and the result returned. If not, the invalid model,
with validation errors, is returned.

Note that this rebinds the validated user object
to the same binding used to call the macro.
sourceraw docstring

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

× close