Handle validation exceptions
This commit is contained in:
parent
d4fecd5f11
commit
7a1193dfc1
3 changed files with 3 additions and 6 deletions
|
|
@ -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…
Add table
Reference in a new issue