feat: try fix test

This commit is contained in:
2026-05-17 15:51:01 +02:00
parent 26aeb356d8
commit 0d922f223b
3 changed files with 22 additions and 7 deletions
+2 -1
View File
@@ -13,7 +13,8 @@ class MealPostsRequest extends FormRequest
$isCreating = $this->isMethod('post');
return [
'image' => ['sometimes', 'nullable', 'image', 'max:4096'],
'image' => [$isCreating ? 'required_without:image_url' : 'sometimes', 'nullable', 'image', 'max:4096'],
'image_url' => [$isCreating ? 'required_without:image' : 'sometimes', 'nullable', 'string', 'max:2048'],
'caption' => ['nullable', 'string', 'max:1000'],
'calories' => ['nullable', 'integer', 'min:0'],
'proteins' => ['nullable', 'numeric', 'min:0'],