component_status is required if we send component_id. Closes #1112

This commit is contained in:
James Brooks
2015-11-08 19:06:26 +00:00
parent 5f1f6d3c04
commit a38a29bc2d
2 changed files with 3 additions and 3 deletions
@@ -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',
];