Add validation to importers to fix invalid/empty columns #222

This commit is contained in:
Nabeel Shahzad
2018-03-30 17:27:29 -05:00
parent bd30b1f900
commit 63544088cd
21 changed files with 124 additions and 68 deletions
@@ -18,15 +18,15 @@ class AirportImporter extends ImportExport
* Should match the database fields, for the most part
*/
public static $columns = [
'icao',
'iata',
'name',
'location',
'country',
'timezone',
'hub',
'lat',
'lon',
'icao' => 'required',
'iata' => 'required',
'name' => 'required',
'location' => 'nullable',
'country' => 'nullable',
'timezone' => 'nullable',
'hub' => 'nullable|boolean',
'lat' => 'required|numeric',
'lon' => 'required|numeric',
];
/**