<?php

namespace App\Http\Requests\Profile;

use Illuminate\Foundation\Http\FormRequest;

class UpdatePhoneRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user() !== null;
    }

    public function rules(): array
    {
        return [
            'phone_country_code' => ['required', 'string', 'max:5'],
            'phone' => ['required', 'string', 'max:32'],
        ];
    }
}
