Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
In the most recent changes (since Friday) I've noticed what appears to be a regression in the way required multiple fields are validated.
Expected behaviour
If a required field which accepts multiple values (list, select with multiple: true, relation with multiple: true) has at least one entry (or min entries if min is greater than 1), validation should succeed.
Actual behaviour
For required multiple select or relation fields, validation fails with a message that the field is required (even though it has been filled in).
For required list fields, validation always fails with no message on the field itself (but the editor identifies one field with errors).
In both circumstances, setting required to false resolves the error and the content can be saved.
I’ve just reverted a commit that caused the regression and shipped v0.19.10. I’ll be reworking the validation code and writing tests soon. Sorry for the inconvenience!
In the most recent changes (since Friday) I've noticed what appears to be a regression in the way required multiple fields are validated.
Expected behaviour
If a required field which accepts multiple values (
list
,select
withmultiple: true
,relation
withmultiple: true
) has at least one entry (ormin
entries ifmin
is greater than 1), validation should succeed.Actual behaviour
select
orrelation
fields, validation fails with a message that the field is required (even though it has been filled in).In both circumstances, setting
required
tofalse
resolves the error and the content can be saved.Here's a minimal reproduction: https://github.com/greatislander/multiple-validation. I was able to elicit the behaviour I described above in local mode using Chrome (I served the site using
npx serve .
).P.S. Thanks for the awesome work on this project. Your efforts to make the editor WCAG 2.2 compliant are deeply appreciated.