This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-28
Channels
- # announcements (2)
- # babashka (16)
- # bangalore-clj (1)
- # beginners (93)
- # boot (11)
- # calva (5)
- # cider (13)
- # clj-kondo (49)
- # cljdoc (14)
- # cljs-dev (1)
- # clojure (99)
- # clojure-dev (3)
- # clojure-europe (1)
- # clojure-india (1)
- # clojure-italy (9)
- # clojure-nl (3)
- # clojure-poland (1)
- # clojure-russia (1)
- # clojure-spec (31)
- # clojure-uk (21)
- # clojured (2)
- # clojurescript (18)
- # core-async (12)
- # cursive (36)
- # data-science (1)
- # datomic (54)
- # duct (3)
- # emacs (33)
- # events (1)
- # fulcro (17)
- # jobs (1)
- # joker (8)
- # keechma (1)
- # leiningen (7)
- # malli (8)
- # nrepl (19)
- # pathom (6)
- # planck (18)
- # re-frame (20)
- # reagent (18)
- # shadow-cljs (3)
- # sql (7)
- # vim (31)
Hey so I feel really dumb but how would I make a malli schema which validates that I have a non-empty string 😅 I’m thinking something like [:and string? [:not= blank?]]
but there’s no blank?
predicate support…
blank?
does string check internally as well so it doesn’t need to be :and
schema but anyhoos…
@suomi.esko You can use any predicate with :fn
, either: [:fn str/blank?]
(local, fast) or [:fn 'str/blank?]
(portable)
@ikitommi Seems to work for the positive case, but I really do want to test the negation of that and I can’t seem to get it to work, or at least :not=
isn’t what I should use. I think there isn’t a complementing predicate yet? 🙂