All API routes seem to work.

This commit is contained in:
James Cole
2018-03-04 08:22:32 +01:00
parent 2ab44fb33a
commit 7171e69715
7 changed files with 12 additions and 5 deletions

View File

@@ -108,8 +108,8 @@ class BillRequest extends Request
$validator->after(
function (Validator $validator) {
$data = $validator->getData();
$min = floatval($data['amount_min']);
$max = floatval($data['amount_max']);
$min = floatval($data['amount_min'] ?? 0);
$max = floatval($data['amount_max'] ?? 0);
if ($min > $max) {
$validator->errors()->add('amount_min', trans('validation.amount_min_over_max'));
}