bouncer
bouncer copied to clipboard
A validation DSL for Clojure & Clojurescript applications
e.g. ```clj {:deps {bouncer {:git/url "https://github.com/condense/bouncer.git" :sha "3013b601c8b3de0fdcd645a998cc8783a01e71ae"}}} ```
formatting
I came across a surprising `matches` validator behavior: it marks a value as valid when only part of the value satisfies given regex: ``` (b/valid? {:name "ab"} {:name [v/required v/string...
In [bouncer/src/bouncer/validators.cljx](https://github.com/leonardoborges/bouncer/blob/master/src/bouncer/validators.cljx) the email validation uses the following regex: `#"^[^@]+@[^@\\.]+[\\.].+"` I'm interested in that escaped backslash near the end. Why is it there? It allows the following email address to...
I needed this in one of my projects, and I thought that others might benefit from this.
Is Bouncer still maintained? I've few features that I'd like to see here, but I don't know if I should create a PR or a fork. Thank for answering.
Are there any plans to add coercion for fields? For example, the following fails: ` (validate {:id "1"} {:id [v/positive v/number]}) ` Something like this could work: ` (validate {:id...
``` (bouncer/validate {:date "2016-01-01"} :date validators/datetime (:mysql fmt/formatters)) Output -> [nil {:date "2016-01-01"}] (bouncer/validate {:date "2016-01-01"} :date [[validators/datetime (:mysql fmt/formatters)]]) Output-> [{:date ("date must be a valid date")} {:date "2016-01-01"...
I'd like to propose the possibility of looking at a new method of grabbing error messages where the metadata for the function is created dynamically, and therefore can take parameters....
When nesting validation sets, functions supplied as `:pre` get the entire data structure passed to `b/validate`, not just the nested structure that they would normally get. This basically breaks their...