I am using malli.core/=> for function schema validation, I am able to handle standard fn-arguments with their respective validator-fn but how can I handle variadic arguments. A sample code
(malli.core/=> fn-with-variadic-args
[:=> [:cat {:malli/fn-name with-var-args} int? string? int?] any?])
(defn fn-with-variadic-args
[int-val string-val int-val' & [map-val]]
(prinlnt (format "%s:%s => {%s}" string-val (+ int-val int-val') (:string-value map-val))))
I am getting `Invalid function arity` exception staging expected 3 got 4Thanks a lot @ambrosebs that worked like a charm 🖖 🙇
try something like this https://github.com/metosin/malli/blob/39244905665541c8d895c8b121b6ecf508fc2b18/test/malli/experimental_test.clj#L103-L106