Duplicating documents with required, localized text fields fails with a "ValidationError: The following fields are invalid" message #4232
Labels
status: needs-triage
Possible bug which hasn't been reproduced yet
Link to reproduction
No response
Describe the Bug
Hi,
Currently it is possible to create a document with a required and localized field, without adding a translation for every supported language. However, I get an error message whenever I try to duplicate an existing document with this kind of field. Duplicating a non-localized, required field works as expected. Duplicating a localized, optional field also works.
An example error message from one of my collections with a "title" field:
ValidationError: The following fields are invalid: title
.This behavior is problematic, as we have quite a lot of localized content, and currently duplication doesn't work for any of it.
The expected behavior is that duplication only validates the currently used locale, like when creating a new document.
To Reproduce
Payload Version
2.1.0
Adapters and Plugins
db-mongodb, bundler-webpack
The text was updated successfully, but these errors were encountered: