Files
thecrimesynticate/app/Http/Requests/Game/AttackRequest.php
T
2026-07-04 17:09:55 +03:00

42 lines
893 B
PHP

<?php
namespace App\Http\Requests\Game;
use Illuminate\Foundation\Http\FormRequest;
class AttackRequest 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 [
'mug' => ['sometimes', 'boolean'],
'hit' => ['sometimes', 'boolean'],
];
}
/**
* Get custom messages for validator errors.
*
* @return array<string, string>
*/
public function messages(): array
{
return [
'mug.boolean' => 'The mug option must be a boolean value.',
];
}
}