When duplicating a blog post with a unique field (slug in my case) I get the error 'The following field is invalid: slug'
While I understand why this is happening, would it be possible to duplicate an item and then clear the unique field? Allowing the user to duplicate and requiring the unique field to be updated
You can use the
beforeDuplicate
hook to assign a new unique slug to the document
https://payloadcms.com/docs/configuration/collections#admin-hooksStar
Discord
online
Get help straight from the Payload team with an Enterprise License.