AVMG
This commit is contained in:
parent
57edcd0b57
commit
f331049ec0
|
@ -79,7 +79,7 @@ class UserController extends Controller
|
||||||
"credits" => "required|numeric|min:0|max:1000000",
|
"credits" => "required|numeric|min:0|max:1000000",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($request->user()->credits + $request->credits >= 99999999) throw ValidationException::withMessages([
|
if ($user->credits + $request->credits >= 99999999) throw ValidationException::withMessages([
|
||||||
'credits' => "You can't add this amount of credits because you would exceed the credit limit"
|
'credits' => "You can't add this amount of credits because you would exceed the credit limit"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue