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

View File

@@ -18,13 +18,13 @@ class FareImporter extends ImportExport
* Should match the database fields, for the most part
*/
public static $columns = [
'code',
'name',
'price',
'cost',
'capacity',
'notes',
'active',
'code' => 'required',
'name' => 'required',
'price' => 'nullable|numeric',
'cost' => 'nullable|numeric',
'capacity' => 'required|integer',
'notes' => 'nullable',
'active' => 'nullable|boolean',
];
/**