Fix for flight_number check forcing to exist
This commit is contained in:
parent
b06287da23
commit
64a04f70a3
@ -11,10 +11,10 @@ class PrefileRequest extends FormRequest
|
||||
$rules = [
|
||||
'airline_id' => 'required|exists:airlines,id',
|
||||
'aircraft_id' => 'required|exists:aircraft,id',
|
||||
'flight_id' => 'sometimes|exists:flights,id',
|
||||
'flight_number' => 'required',
|
||||
'dpt_airport_id' => 'required|size:4',
|
||||
'arr_airport_id' => 'required|size:4',
|
||||
'flight_id' => 'sometimes|exists:flights,id',
|
||||
'source_name' => 'required',
|
||||
'alt_airport_id' => 'sometimes|size:4',
|
||||
'status' => 'sometimes',
|
||||
|
@ -19,7 +19,8 @@ class UpdateRequest extends FormRequest
|
||||
$rules = [
|
||||
'airline_id' => 'nullable|exists:airlines,id',
|
||||
'aircraft_id' => 'nullable|exists:aircraft,id',
|
||||
'flight_number' => 'sometimes|required|exists:flights,id',
|
||||
'flight_id' => 'sometimes|exists:flights,id',
|
||||
'flight_number' => 'sometimes|required',
|
||||
'dpt_airport_id' => 'sometimes|required|size:4',
|
||||
'arr_airport_id' => 'sometimes|required|size:4',
|
||||
'route_code' => 'nullable',
|
||||
|
Loading…
Reference in New Issue
Block a user