admin
admin copied to clipboard
How to display validation errors for embedded relations?
#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?