<?php

namespace App\Http\Requests\Families;

use App\Http\Requests\ApiFormRequest;

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

    public function rules(): array
    {
        return [
            'student_id' => ['required', 'integer', 'min:1'],
            'email' => ['required', 'email', 'max:255'],
            'firstname' => ['nullable', 'string', 'max:255'],
            'lastname' => ['nullable', 'string', 'max:255'],
            'relation' => ['nullable', 'string', 'max:50'],
        ];
    }
}
