struct
struct copied to clipboard
Structural validation library for Clojure(Script)
For example, while using with REST APIs (Luminus), for POST request all fields validated as defined in validation schema, but for PUT request, only fields present in request body validated...
Add note for `integer-str` 's confusing behavior. See also https://github.com/funcool/struct/issues/23 .
```clojure (def integer-str {:message "must be a long" :optional true :validate #(or (number? %) (and (string? %) (str/numeric? %))) :coerce #(if (number? %) (int %) (str/parse-int %))}) ``` `:validate` only...
https://funcool.github.io/struct/latest/ has 404 for its css page, which comes from https://niwi.nz/_assets/asciidoctor-styles/simple-red-titles/stylesheet.css
Related to #24
Hi, funcool. Thank you for your creating nice validation library. I've found a mismatch between document and its work. `validate` API's comment says, > This function by default strips all...