Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
fix: skip validation for unpublish operations with localized required fields (#16120)
## Problem
Unpublishing documents with `required: true` + `localized: true` fields
fails with a validation error when `localization.fallback: false`.
The `UnpublishButton` sends only `{ _status: 'draft' }` with
`unpublishAllLocales=true` but no field data, causing `beforeChange`
validation to fail on missing required fields.
## Solution
Added `unpublishAllLocales` to the `skipValidation` condition in
`beforeChange` for both collections and globals — same pattern already
used for `isSavingDraft`.
## Why
Unpublish is a metadata-only operation (changing `_status`). Field
validation is unnecessary since data already exists in the database.
Fixes #15651
---------
Co-authored-by: Patrik Kozak <35232443+PatrikKozak@users.noreply.github.com> O
Omar Yusuf Abdi committed
24b9e13d722e50855f2b7b95d13a1d83ccf8d260
Parent: 76f3693
Committed by GitHub <noreply@github.com>
on 4/1/2026, 8:35:49 PM