component_status is required if we send component_id. Closes #1112
This commit is contained in:
@@ -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',
|
||||
];
|
||||
|
||||
@@ -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',
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user