Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

How to display validation errors for embedded relations?

オープン
#388 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

まず、EditGuesser から ArrayInput および SimpleFormIterator までのバリデーション処理を追跡し、configs[].name と configs[].data のエラーが TextInput フィールドにどのようにマッピングされるかに注目します。示されている無効なレスポンスを再現し、それぞれのネストされた入力がフォームレベルの flash メッセージだけでなく、サーバーのバリデーションエラーを表示することを確認します。

索引モデルが issue の本文から書いたものです。

説明

#249 is closed with the words that Hydra documentation could not be used. So, in my case I have this:

        <EditGuesser onSuccess={ onSuccess } {...props}>
            <InputGuesser source="domain"/>
            <ArrayInput source="configs"> // instead of InputGuesser, which doesn't detect as expected
                <SimpleFormIterator>
                    <TextInput label="setting" source="name"/> // instead of InputGuesser
                    <TextInput label="value" source="data"/> // instead of InputGuesser
                </SimpleFormIterator>
            </ArrayInput>
        </EditGuesser>

It renders this way:

image

And all works fine until I try to submit the data that is invalid. Here is the response:

image

The problem is that the errors do not get attached to the inputs. In fact no errors are displayed apart The form is not valid. Please check for errors. and then for some reason Server communication error. And those are displayed just as a flash message. How can I display the validation errors for configs[*].name and configs[*].data fields?

主要言語
TypeScript
スター
516
フォーク
134
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

api-platform/admin のほかの issue

api-platform/admin の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。