PXG_2026_API/app/Http/Requests/JoinGroupRequest.php

26 lines
706 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class JoinGroupRequest extends FormRequest
{
public function authorize(): bool { return true; }
public function rules(): array
{
return [
'player.name' => ['required','string','max:120'],
'player.phone' => ['required','string','max:40'],
'player.email' => ['required','email','max:180'],
'handicap.type' => ['required','in:HI,EVENT_BAND'],
'handicap.value' => ['nullable','numeric','min:0','max:60'],
'handicap.band' => ['required','in:LOW,MID,HIGH,BEGINNER'],
'consent' => ['required','boolean'],
];
}
}