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