Skip to content

Error on Nested schema with inputs_for #124

@lillo42

Description

@lillo42

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: %{}

Screenshot 2025-01-12 at 01 06 28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions