mirror of
https://github.com/penpot/penpot.git
synced 2025-02-12 18:18:24 -05: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:
parent
4eab2f81cf
commit
5165ac6e52
1 changed files with 6 additions and 0 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Reference in a new issue