Is it possible to define :keyword schema that limits the size of the keyword?
I would do:
[:and :keyword
[:fn (fn [k] (< (count (name k)) 10)]]yeah I figured that one out already, was hoping for something shorter
PR welcome, just need to add support for :min and :max for :keyword, see string
(defn -string-schema [] (-simple-schema {:type :string, :pred string?, :property-pred (-min-max-pred count)}))
(defn -keyword-schema [] (-simple-schema {:type :keyword, :pred keyword?}))Is it possible to have malli drop extra keys from maps when coercing? If I mark map as closed that makes extra keys invalid, I would just like to ignore them remove them from the data structure
look at https://github.com/metosin/malli?tab=readme-ov-file#value-transformation the mt/strip-extra-keys-transformer
Thanks