0
votes

I'm trying to add validation in custom form in administration. The required field has required property. I've also added required flag in entity definition (with ->addFlags(new Required())), and when I save form with empty field, I've got an error from endpoint that says the field is required.

But I can't figure out how to show error message under this field. For example when I'm creating new sales channel and save empty form, there are error messages under required fields.

How can I add this kind of error handling?

1

1 Answers

0
votes

I think I've found it. There is mapApiErrors function which maps api errors from global state to given entity and properties.