1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Handle validation exceptions

This commit is contained in:
Hillel Coren 2018-01-07 12:50:22 +02:00
parent d4fecd5f11
commit 7a1193dfc1
3 changed files with 3 additions and 6 deletions

View File

@ -140,6 +140,7 @@ class Handler extends ExceptionHandler
if (Utils::isNinjaProd()
&& ! Utils::isDownForMaintenance()
&& ! ($e instanceof HttpResponseException)
&& ! ($e instanceof \Illuminate\Validation\ValidationException)
&& ! ($e instanceof ValidationException)) {
$data = [
'error' => get_class($e),

View File

@ -23,8 +23,6 @@ class CreateExpenseRequest extends ExpenseRequest
*/
public function rules()
{
return [
'amount' => 'numeric',
];
return [];
}
}

View File

@ -21,8 +21,6 @@ class UpdateExpenseRequest extends ExpenseRequest
*/
public function rules()
{
return [
'amount' => 'numeric',
];
return [];
}
}