<?php

namespace App\Http\Requests\Attachment;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'document_number' => ['sometimes', 'nullable', 'string', 'max:50'],
            'full_name'       => ['sometimes', 'nullable', 'string', 'max:255'],
            'dob'             => ['sometimes', 'nullable', 'date'],
            'expiry_date'     => ['sometimes', 'nullable', 'date', 'after:today'],
            'nationality'     => ['sometimes', 'nullable', 'string', 'max:100'],
            'issuing_country' => ['sometimes', 'nullable', 'string', 'max:100'],
        ];
    }
}
