<?php

namespace App\Http\Requests\DataEntry;

use Illuminate\Foundation\Http\FormRequest;

class StoreWitnessRequest extends FormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'id' => ['required'],
            'witnessess' => ['nullable', 'integer', 'min:1', 'max:20'],
            'relation' => ['nullable'],
            'sex' => ['nullable'],
            'agegroup' => ['nullable'],
            'name' => ['nullable', 'string', 'max:255'],
        ];
    }
}
