How to display validation errors for embedded relations?
まだ誰も着手していません。
評価
- 難易度
- 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:

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

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 はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
api-platform/admin のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
api-platform/admin#616 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
api-platform/admin#660 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
api-platform/admin#659 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
api-platform/admin#631 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/admin#626 · コメント 1 件 · リアクション 1 件 ·
api-platform/admin の issue をすべて見る
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100