Okay. I was able to reproduce the problem using the above repo.
submit_errors: [task_id: {"is required", []}],
Here is the full output I received upon form submission.
save output =#################: {:error,
#AshPhoenix.Form<
resource: AshAddFormTest.Tasks.Task,
action: :create,
type: :create,
params: %{
"task_members" => %{
"0" => %{"email" => "larry@email.com", "member_type" => "1"},
"1" => %{"email" => "Team@email.com", "member_type" => "1"}
},
"task_name" => "Test"
},
source: #Ash.Changeset<
action_type: :create,
action: :create,
attributes: %{task_name: "Test"},
relationships: %{
task_members: [
{[
%{"email" => "larry@email.com", "member_type" => "1"},
%{"email" => "Team@email.com", "member_type" => "1"}
],
[
ignore?: false,
on_missing: :ignore,
on_match: :ignore,
on_lookup: :ignore,
on_no_match: :create,
eager_validate_with: false,
authorize?: true,
meta: [inputs_was_list?: true, id: :task_members],
type: :create
]}
]
},
arguments: %{
task_members: [
%{"email" => "larry@email.com", "member_type" => "1"},
%{"email" => "Team@email.com", "member_type" => "1"}
]
},
errors: [],
data: #AshAddFormTest.Tasks.Task<
comments: #Ash.NotLoaded<:relationship>,
task_members: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:built, "tasks">,
id: nil,
task_name: nil,
inserted_at: nil,
updated_at: nil,
aggregates: %{},
calculations: %{},
...
>,
valid?: true
>,
name: "form",
data: nil,
form_keys: [
task_members: [
resource: AshAddFormTest.Accounts.TaskMember,
data: [
#AshAddFormTest.Accounts.TaskMember<
task: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:built, "task_members">,
id: nil,
member_type: nil,
row_order: nil,
email: nil,
inserted_at: nil,
updated_at: nil,
task_id: nil,
aggregates: %{},
calculations: %{},
...
>
],
create_action: :create,
update_action: :update,
type: :list
]
],
forms: %{
task_members: [
#AshPhoenix.Form<
resource: AshAddFormTest.Accounts.TaskMember,
action: :update,
type: :update,
params: %{"email" => "larry@email.com", "member_type" => "1"},
source: #Ash.Changeset<
action_type: :update,
action: :update,
attributes: %{member_type: 1, email: "larry@email.com"},
relationships: %{},
errors: [],
data: #AshAddFormTest.Accounts.TaskMember<
task: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:built, "task_members">,
id: nil,
member_type: nil,
row_order: nil,
email: nil,
inserted_at: nil,
updated_at: nil,
task_id: nil,
aggregates: %{},
calculations: %{},
...
>,
valid?: true
>,
name: "form[task_members][0]",
data: #AshAddFormTest.Accounts.TaskMember<
task: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:built, "task_members">,
id: nil,
member_type: nil,
row_order: nil,
email: nil,
inserted_at: nil,
updated_at: nil,
task_id: nil,
aggregates: %{},
calculations: %{},
...
>,
form_keys: [],
forms: %{},
api: nil,
method: "put",
submit_errors: [],
id: "form_task_members_0",
transform_errors: nil,
original_data: #AshAddFormTest.Accounts.TaskMember<
task: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:built, "task_members">,
id: nil,
member_type: nil,
row_order: nil,
email: nil,
inserted_at: nil,
updated_at: nil,
task_id: nil,
aggregates: %{},
calculations: %{},
...
>,
transform_params: nil,
prepare_params: nil,
prepare_source: nil,
warn_on_unhandled_errors?: true,
any_removed?: false,
added?: false,
changed?: true,
touched_forms: MapSet.new([:row_order, "_form_type", "_touched",
"email", "id", "member_type"]),
valid?: true,
errors: true,
submitted_once?: true,
just_submitted?: true,
...
>,
#AshPhoenix.Form<
resource: AshAddFormTest.Accounts.TaskMember,
action: :create,
type: :create,
params: %{"email" => "Team@email.com", "member_type" => "1"},
source: #Ash.Changeset<
action_type: :create,
action: :create,
attributes: %{member_type: 1, email: "Team@email.com", row_order: 0},
relationships: %{},
errors: [
%Ash.Error.Changes.Required{
field: :task_id,
type: :attribute,
resource: AshAddFormTest.Accounts.TaskMember,
changeset: nil,
query: nil,
error_context: [],
vars: [],
path: [],
stacktrace: #Stacktrace<>,
class: :invalid
}
],
data: #AshAddFormTest.Accounts.TaskMember<
task: #Ash.NotLoaded<:relationship>,
__meta__: #Ecto.Schema.Metadata<:built, "task_members">,
id: nil,
member_type: nil,
row_order: nil,
email: nil,
inserted_at: nil,
updated_at: nil,
task_id: nil,
aggregates: %{},
calculations: %{},
...
>,
valid?: false
>,
name: "form[task_members][1]",
data: nil,
form_keys: [],
forms: %{},
api: nil,
method: "post",
submit_errors: [task_id: {"is required", []}],
id: "form_task_members_1",
transform_errors: nil,
original_data: nil,
transform_params: nil,
prepare_params: nil,
prepare_source: nil,
warn_on_unhandled_errors?: true,
any_removed?: false,
added?: true,
changed?: true,
touched_forms: MapSet.new([:row_order, "_form_type", "email",
"member_type"]),
valid?: false,
errors: true,
submitted_once?: true,
just_submitted?: true,
...
>
]
},
api: AshAddFormTest.Tasks,
method: "post",
submit_errors: [],
id: "form",
transform_errors: nil,
original_data: nil,
transform_params: nil,
prepare_params: nil,
prepare_source: nil,
warn_on_unhandled_errors?: true,
any_removed?: false,
added?: false,
changed?: true,
touched_forms: MapSet.new(["task_members", "task_name"]),
valid?: false,
errors: true,
submitted_once?: true,
just_submitted?: true,
...
>}