['required', 'string', Rule::in([Status::Draft->value, Status::Scheduled->value, Status::Publishing->value])], 'content' => ['nullable', 'string', 'max:63206'], 'media' => ['sometimes', 'array'], 'platforms' => ['sometimes', 'array'], 'platforms.*.id' => ['required', 'uuid', Rule::exists('post_platforms', 'id')->where('post_id', $this->route('post') instanceof Post ? $this->route('post')->id : $this->route('post'))], 'platforms.*.content_type' => [ 'sometimes', 'string', Rule::in(array_column(ContentType::cases(), 'value')), new ContentTypeMatchesPostPlatform, ], 'platforms.*.meta' => ['nullable', 'array'], 'scheduled_at' => [ 'nullable', 'date', Rule::when( $this->input('status') === Status::Scheduled->value, ['after:now'] ), ], 'label_ids' => ['sometimes', 'array'], 'label_ids.*' => ['uuid', Rule::exists('workspace_labels', 'id')->where('workspace_id', $this->user()->currentWorkspace->id)], ]; } }