decaporg / decaporg/decap-cms

Config option to escape required fields check when in draft stage of editorial workflow

Open
#5,013 4 comments 0 reactions 0 assignees View on GitHub
area: ui/editor area: ui/editorial-workflow area: validation type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

### Is your feature request related to a problem? Please describe.
Using the editorial workflow while working on pieces of long-form content with many required fields may warrant multiple iterations of work to be done on a single entry in order for all of those required fields to be entered in. Currently, I'm not aware of a way to save a draft without all the required fields being filled out.

That's frequently been a pain point I've encountered on a WIP entry and usually just leads me to leave the editor up for multiple days until I can fill everything out and finally be able to save - a very dicey practice if your computer crashes and you somehow lose the `localforage` backup of all that work, which has unfortunately happened to me a couple times. The dirty workaround is to add dummy data to those fields, but then that can easily sneak its way into production and is therefore bad practice in my opinion.

### Describe the solution you'd like
I would like an `editorial_workflow` config option allowing `required` field validation to be turned off for content currently in/going into `draft` status. This would then allow a new entry to be saved as a draft without adding in all of the required fields. Then, content going into the `ready` or `in_review` statuses could run the `required` field validation hook to ensure nothing publish-ready is missing any required fields.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.