goal
goal copied to clipboard
Error on Nested schema with inputs_for
Hello, when I use the nested schema with inputs_for I'm getting an exceptions
my scheam
defparams :new do
required :uuid, :string, format: :uuid
required :name, :string, min: 3, max: 3
optional :age, :integer, min: 0, max: 120
optional :gender, :enum, values: ["female", "male", "non-binary"]
optional :data, :map do
required :color, :string
optional :money, :decimal
optional :height, :float
end
end
<.simple_form for={@form}>
<.inputs_for :let={data} field={@form[:data]}></.inputs_for>
</.simple_form>
The errors:
key :__struct__ not found in: %{}
@martinthenth is goal missing some kind of protocol implementation? Or should the goal approach change to create structs for defparams? 🤔