From 459e79d26124f364594f3d75f67b155023799c04 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Wed, 23 Dec 2015 15:46:44 +0000 Subject: [PATCH] Improved validation of component_id field --- app/Commands/Incident/ReportIncidentCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Commands/Incident/ReportIncidentCommand.php b/app/Commands/Incident/ReportIncidentCommand.php index 0d840b70..2d6dde33 100644 --- a/app/Commands/Incident/ReportIncidentCommand.php +++ b/app/Commands/Incident/ReportIncidentCommand.php @@ -93,7 +93,7 @@ final class ReportIncidentCommand 'status' => 'required|int|min:0|max:4', 'message' => 'string', 'visible' => 'bool', - 'component_id' => 'int', + 'component_id' => 'int|exists:components|required_with:component_status', 'component_status' => 'int|min:1|max:4|required_with:component_id', 'notify' => 'bool', 'incident_date' => 'string',