mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
Add schema validation
This commit is contained in:
parent
5e39f33bff
commit
44e4e85201
1 changed files with 8 additions and 1 deletions
|
@ -348,6 +348,12 @@
|
|||
(def check-token-themes!
|
||||
(sm/check-fn ::token-themes))
|
||||
|
||||
(def schema:active-token-themes
|
||||
[:set string?])
|
||||
|
||||
(def valid-active-token-themes?
|
||||
(sm/validator schema:active-token-themes))
|
||||
|
||||
;; === Tokens Lib
|
||||
|
||||
(defprotocol ITokensLib
|
||||
|
@ -564,7 +570,8 @@
|
|||
|
||||
(validate [_]
|
||||
(and (valid-token-sets? sets) ;; TODO: validate set-groups
|
||||
(valid-token-themes? themes))))
|
||||
(valid-token-themes? themes)
|
||||
(valid-active-token-themes? active-themes))))
|
||||
|
||||
(defn valid-tokens-lib?
|
||||
[o]
|
||||
|
|
Loading…
Add table
Reference in a new issue