['sometimes', 'string'], 'scheduled_at' => ['sometimes', 'nullable', 'string'], 'platforms' => ['sometimes', 'array'], 'platforms.*.id' => ['required', 'uuid', Rule::exists('post_platforms', 'id')->where('post_id', $this->route('post')->id ?? $this->route('post'))], 'platforms.*.content' => ['nullable', 'string', 'max:5000'], 'label_ids' => ['sometimes', 'array'], 'label_ids.*' => ['uuid', Rule::exists('workspace_labels', 'id')->where('workspace_id', $this->user()->currentWorkspace->id)], ]; } public function messages(): array { return [ 'scheduled_at.after' => 'The scheduled date must be in the future.', ]; } }