How can I add a composite unique condition on two fields (author, slug)
{
name: 'slug',
type: 'text',
},
{
name: 'author',
type: 'relationship',
relationTo: 'creators',
},
@rednithin you could make a third field that concatenates these two (with a hook), and mark that field as unique.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.