Is there a simple way of stopping user from saving and publishing when a field is empty?
To stop publishing when field is empty, there is no OOTB functionality. One option how you can achieve it with minimal effort is to put item (template) under workflow and use below approach to disable saving item when field is empty.
This will force content editors to fill in field values before saving and proceeding to next step of workflow. Afterwards they need to finish workflow and publish. Publish can be then manually or automatically when workflow is pushed to last step.
Without filling field, publishing won't be also possible.
You need to apply validation rules and especially FatalError to prevent saving of item when field is empty.
To achieve this you need to:
- Create similar validation rule as "Required" validation rule which is OOTB to achieve checking whether field is empty. By similar I meant exact copy (:-)) of '/sitecore/system/Settings/Validation Rules/Field Rules/Required' item
- Configure validation rule as FatalError - this will halt saving of item when validation fails - Set
Result=FatalErroras value of
Parametersfield in your validation rule
- Assign validation rule for your item template - to be sure item is not saved in every scenario, you need to select the Validation Rules` section in item template and select the rules to apply in the fields “Quick Action Bar", “Validate Button”, “Validator Bar” and the “Workflow”.