malli
(def passport-schema-2 [:map [:byr [:int {:min 1920 :max 2002}]] [:cid {:optional true} :any] [:ecl [:enum "amb" "blu" "brn" "gry" "grn" "hzl" "oth"]] [:eyr [:int {:min 2020 :max 2030}]] [:iyr [:int {:min 2010 :max 2020}]] [:hcl #"^#[0-9a-f]{6}$"] [:hgt [:or [:map [:unit #"cm"] [:value [:int {:min 150 :max 193}]]] [:map [:unit #"in"] [:value [:int {:min 59 :max 76}]]]]] [:pid #"^\d{9}$"]])
;; instrument, clj-kondo + pretty errors (require '[malli.dev :as dev]) (require '[malli.dev.pretty :as pretty]) (dev/start! {:report (pretty/reporter)}) (require '[malli.instrument :as mi]) (mi/instrument!) (require '[malli.clj-kondo :as mc]) (mc/emit!)
관련 문서
Plugin Backlinks: 아무 것도 없습니다.