Am i missing something or is it not possible to make reusable schema fields required?
Environment
Xperience by Kentico version: [31.3.0]
.NET version: [8]
Execution environment: [Private cloud (Azure/AWS/Virtual machine)]
You have no notifications.
Am i missing something or is it not possible to make reusable schema fields required?
Environment
Xperience by Kentico version: [31.3.0]
.NET version: [8]
Execution environment: [Private cloud (Azure/AWS/Virtual machine)]
Because of the database architecture used by reusable field schema fields you cannot define the fields (database columns) as not-null.
You can however apply UI validation to each field using the field validation rules. You can even define custom validation rules.
So, you could add a validation rule requiring the field has a value. If the no value is supplied, the content item form cannot be saved.
This is expected behavior in XbyK.
Reusable field schemas are built on a flexible data structure rather than fixed database columns, so enforcing a NOT NULL constraint at the database level isn’t supported.
However, you can achieve the same outcome by applying validation rules on the field. By marking the field as required (or adding a custom validation rule), the system will prevent the content item from being saved unless a value is provided.
So while it’s not enforced at the database layer, it can be effectively handled through UI-level validation.
To response this discussion, you have to login first.