Stricter checks on ACARS API data (#451)
* Stricter checks on ACARS API data * More checks
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user