mirror of
https://github.com/penpot/penpot.git
synced 2026-02-13 15:13:03 +00:00
Add valid? predicate that prints debug info to stdout.
When the predicate fails. Very usefull when used with preconditions that by default does not print nothing.
This commit is contained in:
@@ -31,6 +31,12 @@
|
||||
:context (s/explain-data spec data))
|
||||
result)))
|
||||
|
||||
(defn valid?
|
||||
[spec data]
|
||||
(if (s/valid? spec data)
|
||||
true
|
||||
(s/explain spec data)))
|
||||
|
||||
;; --- Predicates
|
||||
|
||||
(defn email?
|
||||
|
||||
Reference in New Issue
Block a user