Validation fails when optional object field has required fields
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
I think this similar but not the same as #7383
**Describe the bug**
When an `object` field is optional but has a required field, it fails validation when all its fields are empty.
**To Reproduce**
Add this field to a collection:
```yaml
- name: submittedBy
label: Submitted by
widget: object
summary: '{{fields.name}}'
required: false
i18n: false
fields:
- name: name
label: Name
widget: string
- name: url
label: Url (separate multiple entries with a comma)
widget: list
required: false
```
Try to save an item without setting `submittedBy.name`
**Expected behavior**
Validation should pass, and item be saved without `subittedBy`
**Screenshots**
Instead:
**Applicable Versions:**
- Decap CMS version: 3.9.0
Contributor guide
Assessment
This issue has not been assessed yet.