Stricter checks on ACARS API data (#451)

* Stricter checks on ACARS API data

* More checks
This commit is contained in:
Nabeel S
2019-12-02 18:27:58 -05:00
committed by GitHub
parent 83821d1e04
commit b06287da23
12 changed files with 166 additions and 86 deletions
+12 -12
View File
@@ -23,18 +23,18 @@ class PositionRequest extends FormRequest
'positions' => 'required|array',
'positions.*.lat' => 'required|numeric',
'positions.*.lon' => 'required|numeric',
'positions.*.status' => 'nullable',
'positions.*.altitude' => 'nullable|numeric',
'positions.*.heading' => 'nullable|numeric|between:0,360',
'positions.*.vs' => 'nullable',
'positions.*.gs' => 'nullable',
'positions.*.transponder' => 'nullable',
'positions.*.autopilot' => 'nullable',
'positions.*.fuel' => 'nullable|numeric',
'positions.*.fuel_flow' => 'nullable|numeric',
'positions.*.log' => 'nullable',
'positions.*.sim_time' => 'nullable|date',
'positions.*.created_at' => 'nullable|date',
'positions.*.status' => 'sometimes',
'positions.*.altitude' => 'sometimes|numeric',
'positions.*.heading' => 'sometimes|numeric|between:0,360',
'positions.*.vs' => 'sometimes',
'positions.*.gs' => 'sometimes',
'positions.*.transponder' => 'sometimes',
'positions.*.autopilot' => 'sometimes',
'positions.*.fuel' => 'sometimes|numeric',
'positions.*.fuel_flow' => 'sometimes|numeric',
'positions.*.log' => 'sometimes|nullable',
'positions.*.sim_time' => 'sometimes|date',
'positions.*.created_at' => 'sometimes|date',
];
return $rules;