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
+19 -19
View File
@@ -12,29 +12,29 @@ class PrefileRequest extends FormRequest
'airline_id' => 'required|exists:airlines,id',
'aircraft_id' => 'required|exists:aircraft,id',
'flight_number' => 'required',
'dpt_airport_id' => 'required',
'arr_airport_id' => 'required',
'flight_id' => 'nullable',
'dpt_airport_id' => 'required|size:4',
'arr_airport_id' => 'required|size:4',
'flight_id' => 'sometimes|exists:flights,id',
'source_name' => 'required',
'alt_airport_id' => 'nullable',
'status' => 'nullable',
'alt_airport_id' => 'sometimes|size:4',
'status' => 'sometimes',
'level' => 'nullable|numeric',
'flight_type' => 'nullable',
'route_code' => 'nullable',
'route_leg' => 'nullable',
'distance' => 'nullable|numeric',
'block_time' => 'nullable|integer',
'flight_time' => 'nullable|integer',
'planned_distance' => 'nullable|numeric',
'planned_flight_time' => 'nullable|integer',
'zfw' => 'nullable|numeric',
'block_fuel' => 'nullable|numeric',
'flight_type' => 'sometimes',
'route_code' => 'sometimes',
'route_leg' => 'sometimes',
'distance' => 'sometimes|numeric',
'block_time' => 'sometimes|integer',
'flight_time' => 'sometimes|integer',
'planned_distance' => 'sometimes|numeric',
'planned_flight_time' => 'sometimes|integer',
'zfw' => 'sometimes|numeric',
'block_fuel' => 'sometimes|numeric',
'route' => 'nullable',
'notes' => 'nullable',
'score' => 'nullable|integer',
'block_off_time' => 'nullable|date',
'block_on_time' => 'nullable|date',
'created_at' => 'nullable|date',
'score' => 'sometimes|integer',
'block_off_time' => 'sometimes|date',
'block_on_time' => 'sometimes|date',
'created_at' => 'sometimes|date',
// See if the fare objects are included and formatted properly
'fares' => 'nullable|array',