<?php

namespace App\Http\Requests\ContactMessages;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'name' => ['sometimes', 'required', 'string', 'max:255'],
            'email' => ['sometimes', 'required', 'email', 'max:255'],
            'phone' => ['sometimes', 'nullable', 'string', 'max:50'],
            'customer_type' => ['sometimes', 'nullable', 'string', 'max:50'],
            'message' => ['sometimes', 'required', 'string'],
        ];
    }
}
