Can not make relation field 'required'
complete
R
Risini Piyathma
Strapi v4
I have a collection type named 'Home'.
In the dynamic zone of Home, there is a component, and inside of that component, there is a field with relation. I want to make that relation field required.
Tried this with lifecycle hooks. But component data inside of dynamic zone can not be read within lifecycle.
Any solution for this, or Can make feature changes ?
Emilie Ringwald
updated the status to
complete
Hi Risini, thanks for the request! Good news: since Strapi v5.51.2, you can set a relation field as required directly in the Content-Type Builder, in the field's advanced settings. No lifecycle hook workaround needed anymore.
Release note: https://github.com/strapi/strapi/releases/tag/v5.51.2
I'm marking this one as Complete.