-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
I have created a CMS for a client with an image field that is required. If the client attempts to edit an existing CMS entry they are able to delete that required image and click update without the CMS warning that field is required.
To Reproduce
Add a list of images and mark field as required. Upload a CMS entry, edit the entry, delete the image, click update
Expected behavior
Expect that if a required image field is deleted and accidentally left empty then normal 'required' validation should be present
Screenshots
Applicable Versions:
- Netlify CMS version: 2.12.16
- Git provider: GitHub
- OS: MacOS Catalina
- Node.JS version: 11.15.0
CMS configuration
`backend:
name: git-gateway
branch: master
public_folder: static/images
media_folder: /images
display_url: https://blah.netlify.com/
collections:
- name: "listingUpload"
label: "Add/edit listing"
folder: "src/data/listings"
create: true
extension: "json"
format: "json"
summary: "{{subNum}} {{streetNum}} {{streetName}} {{suburb}}"
identifier_field: summary
media_folder: ""
public_folder: ""
fields:
** inapplicable fields removed for brevity**- {
label: "Images",
name: "images",
widget: "list",
hint: "Important: At least one image is required",
field: { label: "Image", name: "image", widget: "image" },
}
`
- {
Additional context
Metadata
Metadata
Assignees
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code