Liking cljdoc? Tell your friends :D

mongofinil.validation


valid?clj

(valid? validation-seq obj)

Similar to validation-error, but returns a boolean

Similar to validation-error, but returns a boolean
sourceraw docstring

validateclj

(validate validation-seq obj)

validates an object. validation-seq is a seq of fns. Each fn takes one argument, the object to be validated, and returns nil on success, or a string containing a helpful error message on failure.

(validate [(require-pred map?) (require-keys :type :foo) (require-col-pred :foo int?)] m)

validates an object. validation-seq is a seq of fns. Each fn takes one argument, the object to be validated, and returns nil on success, or a string containing a helpful error message on failure.

(validate [(require-pred map?)
           (require-keys :type :foo)
           (require-col-pred :foo int?)] m) 
sourceraw docstring

validate!clj

(validate! validation-seq obj)

Similar to validation-error, but returns the obj being validated, or throws on failure

Similar to validation-error, but returns the obj being validated, or throws on failure
sourceraw docstring

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

× close