-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
area: extensions/editor-componentstype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
The 'required' and 'pattern' for custom widgets is not working.
It shouldn't allow to save the updates if all required fields are not filled.
To Reproduce
- Create a custom widget using CMS.registerEditorComponent
- Set a field as required: true
- Insert the widget inside the markdown and don't fill the required field
- Save the updates
window.CMS.registerEditorComponent({ id: 'collection', label: 'Collection', collapsed: true, fields: [ { label: 'Cards', name: 'cards', widget: 'list', fields: [ { label: 'Title', name: 'title', widget: 'string', required: true, }, ]
Expected behavior
Won't allow save the updates since the field is mandatory.
Applicable Versions:
- netlify-cms-app 2.15.72
- netlify-cms-core 2.55.2
- netlify-cms 2.10.192
- Git provider: gitlab
- OS: windows 10
- Node.JS version: 16.16
Metadata
Metadata
Assignees
Labels
area: extensions/editor-componentstype: bugcode to address defects in shipped codecode to address defects in shipped code