We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems like this is not the intended behavior, but here's what I am seeing locally:
These print different things, but that's not a big problem:
(mc/validate [:and [:catn ["a" :int] ["b" :keyword]] [:fn (fn [x] (prn x) true)]] [3 :x]) ;; prints: [3 :x] ;; => true (mc/parse [:and [:catn ["a" :int] ["b" :keyword]] [:fn (fn [x] (prn x) true)]] [3 :x]) ;; prints: {"a" 3, "b" :x} ;; => {"a" 3, "b" :x}
The problem I'm hitting is when we actually try to validate these things with the attached :fn schema:
(mc/validate [:and [:catn ["a" :int] ["b" :keyword]] [:fn vector?]] [3 :x]) ;; true (mc/parse [:and [:catn ["a" :int] ["b" :keyword]] [:fn vector?]] [3 :x]) ;; => :malli.core/invalid 😢
I sort of can work around it by checking for e.g. (if it's a map with these keys, then it passes validation). but that's not really ideal.
The text was updated successfully, but these errors were encountered:
:and
Successfully merging a pull request may close this issue.
It seems like this is not the intended behavior, but here's what I am seeing locally:
These print different things, but that's not a big problem:
The problem I'm hitting is when we actually try to validate these things with the attached :fn schema:
I sort of can work around it by checking for e.g. (if it's a map with these keys, then it passes validation). but that's not really ideal.
The text was updated successfully, but these errors were encountered: