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:
parent
d4fecd5f11
commit
7a1193dfc1
@ -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),
|
||||
|
@ -23,8 +23,6 @@ class CreateExpenseRequest extends ExpenseRequest
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'amount' => 'numeric',
|
||||
];
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@ -21,8 +21,6 @@ class UpdateExpenseRequest extends ExpenseRequest
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'amount' => 'numeric',
|
||||
];
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user