mergeInertiaPicture(); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'name' => 'required|string|between:3,255', 'exercice' => ['nullable', new Enum(YearsEnum::class)], 'status' => ['required', new Enum(DocumentStatusEnum::class)], 'published_at' => 'nullable|date', 'unpublished_at' => 'nullable|date|after:published_at', 'path' => $this->pictureRules('required|file|mimes:pdf|max:5120'), 'tags' => 'nullable|array', 'tags.*' => 'integer|exists:document_tags,id', 'categories' => 'nullable|array', 'categories.*' => 'integer|exists:document_categories,id', ]; } }