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() if (Utils::isNinjaProd()
&& ! Utils::isDownForMaintenance() && ! Utils::isDownForMaintenance()
&& ! ($e instanceof HttpResponseException) && ! ($e instanceof HttpResponseException)
&& ! ($e instanceof \Illuminate\Validation\ValidationException)
&& ! ($e instanceof ValidationException)) { && ! ($e instanceof ValidationException)) {
$data = [ $data = [
'error' => get_class($e), 'error' => get_class($e),

View File

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

View File

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