<?php

declare(strict_types=1);

namespace App\Http\Requests\Settings;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class UpdatePersonalSectionRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'birthday' => ['nullable', 'date', 'before:today'],
            'gender' => ['nullable', 'in:m,f,x,M,F,X'],
            'country_id' => ['nullable', 'integer', Rule::exists('countries', 'id')],
        ];
    }
}
