Files
payloadcms/test/field-error-states/shared.ts
Jarrod Flesch 2903486974 fix(ui): group/array error paths persisting when valid (#13347)
Fields such as groups and arrays would not always reset errorPaths when
there were no more errors. The server and client state was not being
merged safely and the client state was always persisting when the server
sent back no errorPaths, i.e. itterable fields with fully valid
children. This change ensures errorPaths is defaulted to an empty array
if it is not present on the incoming field.

Likely a regression from
https://github.com/payloadcms/payload/pull/9388.

Adds e2e test.
2025-08-01 16:04:51 +01:00

19 lines
498 B
TypeScript

import type { CollectionSlug, GlobalSlug } from 'payload'
export const collectionSlugs: {
[key: string]: CollectionSlug
} = {
validateDraftsOff: 'validate-drafts-off',
validateDraftsOn: 'validate-drafts-on',
validateDraftsOnAutosave: 'validate-drafts-on-autosave',
prevValue: 'prev-value',
prevValueRelation: 'prev-value-relation',
errorFields: 'error-fields',
}
export const globalSlugs: {
[key: string]: GlobalSlug
} = {
globalValidateDraftsOn: 'global-validate-drafts-on',
}