From d91c26159b3b030ca71156e7f7d8811d9853effa Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Sat, 27 Mar 2021 09:57:57 -0700 Subject: [PATCH] Don't require `ingredients.key` fields --- app/Http/Controllers/RecipeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/RecipeController.php b/app/Http/Controllers/RecipeController.php index 0326e2a..40efec8 100644 --- a/app/Http/Controllers/RecipeController.php +++ b/app/Http/Controllers/RecipeController.php @@ -203,7 +203,7 @@ class RecipeController extends Controller 'ingredients.id.*' => 'required_with:ingredients.amount.*|nullable', 'ingredients.type' => ['required', 'array', new ArrayNotEmpty], 'ingredients.type.*' => ['required_with:ingredients.id.*', 'nullable', new UsesIngredientTrait()], - 'ingredients.key' => ['required', 'array', new ArrayNotEmpty], + 'ingredients.key' => ['nullable', 'array'], 'ingredients.key.*' => ['nullable', 'int'], 'ingredients.weight' => ['required', 'array', new ArrayNotEmpty], 'ingredients.weight.*' => ['required', 'int'],