Files
thecrimesynticate/app/Http/Requests/Game/CharacterDepositRequest.php
T

44 lines
1.1 KiB
PHP
Raw Normal View History

2026-07-04 17:09:55 +03:00
<?php
namespace App\Http\Requests\Game;
use Illuminate\Foundation\Http\FormRequest;
class CharacterDepositRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'amount' => ['required', 'integer', 'min:1', 'max:1000000'],
];
}
/**
* Get custom messages for validator errors.
*
* @return array<string, string>
*/
public function messages(): array
{
return [
'amount.required' => 'You must enter an amount to deposit.',
'amount.integer' => 'The amount must be a whole number.',
'amount.min' => 'The minimum deposit amount is :min.',
'amount.max' => 'The maximum deposit amount is :max.',
];
}
}