Don't require `ingredients.key` fields

This commit is contained in:
Christopher C. Wells 2021-03-27 09:57:57 -07:00
parent 0407899496
commit d91c26159b
1 changed files with 1 additions and 1 deletions

View File

@ -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'],