Abilityto have fields required for publish (not for draft)

Curious if there is a way to have fields that are required for an item to be moved to published status, but allowed to be empty when saving as a draft?

hi @felineblue nope Iā€™m sorry :frowning: Validations get triggered when saving a record, not when publishing one, so if you set a field as required you cannot save a record (= make a new draft) if the field is empty.

Hi, Thank you for getting back. Figured that would be the case. Would be pretty nice for both editors and developers if there was a setting like that!

The only way to do that is by disabling the validations, creating the records and then enabling them.

Validations are fundamental for us also for draft content as in this way we always return valid content. Meaning that the frontend code can be simpler by not implementing all the if-statements needed to check if something is present or not.

Hope you see the value of this approach :slight_smile: