diff --git a/app/Commands/Incident/ReportIncidentCommand.php b/app/Commands/Incident/ReportIncidentCommand.php index fd736798..25bae98a 100644 --- a/app/Commands/Incident/ReportIncidentCommand.php +++ b/app/Commands/Incident/ReportIncidentCommand.php @@ -80,7 +80,7 @@ final class ReportIncidentCommand 'message' => 'string', 'visible' => 'bool', 'component_id' => 'int', - 'component_status' => 'int|min:1|max:4', + 'component_status' => 'int|min:1|max:4|required_with:component_id', 'notify' => 'bool', 'incident_date' => 'string', ]; diff --git a/app/Commands/Incident/UpdateIncidentCommand.php b/app/Commands/Incident/UpdateIncidentCommand.php index 07387ff9..41c7ddd4 100644 --- a/app/Commands/Incident/UpdateIncidentCommand.php +++ b/app/Commands/Incident/UpdateIncidentCommand.php @@ -85,11 +85,11 @@ final class UpdateIncidentCommand */ public $rules = [ 'name' => 'string', - 'status' => 'int', + 'status' => 'int|min:0|max:4', 'message' => 'string', 'visible' => 'bool', 'component_id' => 'int', - 'component_status' => 'int', + 'component_status' => 'int|min:1|max:4|required_with:component_id', 'notify' => 'bool', ];