How to display validation errors for embedded relations?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start by tracing validation handling from EditGuesser through ArrayInput and SimpleFormIterator, focusing on how errors for configs[].name and configs[].data are mapped to TextInput fields. Reproduce the shown invalid response and confirm that each nested input displays its server validation error instead of only form-level flash messages.
Written by the indexing model from the issue text.
Description
#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?
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from api-platform/admin
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
api-platform/admin#616 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
api-platform/admin#660 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
api-platform/admin#659 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
api-platform/admin#631 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
api-platform/admin#626 · 1 comment · 1 reaction ·
All issues in api-platform/admin
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100