Open nickdichev-firework opened 4 days ago
Describe the bug Transforms do not run on fields if their type is a schema but they do run if the type is :map.
:map
To Reproduce
fun = fn _value -> raise("boom") end nested_schema = %{ foo: :string } parent_schema = %{ bar: {nested_schema, {:transform, fun}} } map_schema = %{ bar: {:map, {:transform, fun}} } Peri.validate(parent_schema, %{bar: %{foo: "hello"}}) {:ok, %{bar: %{foo: "hello"}}} Peri.validate(map_schema, %{bar: %{foo: "hello"}}) ** (RuntimeError) boom
Expected behavior Transform runs on the validated schema field
Environment • Elixir version: 1.16.3 • Peri version: 0.2.11
Describe the bug Transforms do not run on fields if their type is a schema but they do run if the type is
:map
.To Reproduce
Expected behavior Transform runs on the validated schema field
Environment • Elixir version: 1.16.3 • Peri version: 0.2.11