slice-machine icon indicating copy to clipboard operation
slice-machine copied to clipboard

Provision to assign a field as mandatory

Open KartikWatts opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Currently, there is no way to ensure that a field is mandatory in a Slice or Custom type.

Describe the solution you'd like

I was considering a solution like providing a checkbox to assign a field as mandatory in the Field Model dialog as in SS:



On the Prismic website, if the field assigned as mandatory is left blank, there can be the same functionality as for UID:

Screenshot_576

Additional context

As we have multiple content creators using the Prismic website, having the validation for fields can be helpful as this would ensure:

  • For the content team: A mandatory field is never left blank by mistake.
  • For the developers: They would be sure of the availability for certain fields.

KartikWatts avatar Nov 01 '23 13:11 KartikWatts

We understand that field validations in some form are desired by our customers. We are currently focused on the new Page Builder, and once this is done we will evaluate a potential solution for integrating field validations as part of this experience. However, we have not scheduled anything yet but will let you know when you start to look into the topic.

comeprismic avatar Nov 08 '23 11:11 comeprismic