(valid? validation-seq obj)Similar to validation-error, but returns a boolean
Similar to validation-error, but returns a boolean
(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) (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
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |