Take the following global:
{
slug: 'test',
label: 'Test',
fields: [
{
name: 'relationship',
type: 'relationship',
relationTo: 'regions',
required: false,
localized: false,
},
{
name: 'description',
type: 'textarea',
required: true,
localized: true,
},
]
}
Through the admin, everything works fine. I can change locale, add/change the description field, and it saves no problem.
Now when I try to do the following
POST
request to the API
/api/globals/test?locale=fr
:
{
"description": "Description en francais"
}
I get the following error:
{
data: [...],
message: "The following field is invalid: relationship"
name: "ValidationError"
}
This looks like a bug to me, but wanted to check with y'all first to make sure I didn't miss something obvious. 🤔
Reproed it in the main repo, created a GitHub issue:
https://github.com/payloadcms/payload/issues/2766✅
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.