@ikitommi sample repo up and running: https://github.com/stevebuik/fork-malli-ideas
first question to come from it: can the fast validation i.e. m/validator be used with m/explain?
and what was the “nested data” problem you had with this integration? maybe it’s another good demo in this repo
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"])
@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!
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…
@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.
@ikitommi I think that is correct. it appears to insist on a flat values map, with string keys. in re-frame that’s easy with a sub. elsewhere it could be harder