Fork me on GitHub
#malli
<
2020-07-07
>
steveb8n01:07:36

first question to come from it: can the fast validation i.e. m/validator be used with m/explain?

steveb8n04:07:40

and what was the “nested data” problem you had with this integration? maybe it’s another good demo in this repo

jkent13:07:09

does malli support default error messages for enums? I’m getting "message": "unknown error" unless I do something like this for each enum:

(def source-system
  [:enum
   {:error/message "should be either: foo|bar"
    :swagger/type  "string"
    :description   "source system from where the request comes in"}
   "foo" "bar"])

ikitommi20:07:01

@jkent the default errors are defined in https://github.com/metosin/malli/blob/master/src/malli/error.cljc. There is no default for :enum, but could be. PR welcome!

ikitommi20:07:31

also, if some more native english-writing person could check the spelling of the default errors, should should be int be should be an int etc…

steveb8n02:07:11

here you go….

steveb8n02:07:29

oops. broke the tests. fix coming

ikitommi21:07:01

@steveb8n just trying to update a value in path like [:user :address :street] , I recall it expected string paths and didn't support nesting. Might have been just user error.