<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ThemeUpdateRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'titre' => ['required_without_all:objectif,description,statut', 'min:3'],
            'objectif' => ['required_without_all:titre,description,statut', 'min:3'],
            'description' => ['required_without_all:titre,objectif,statut', 'min:3'],
            'statut' => ['required_without_all:titre,objectif,description', 'min:3'],
            //'matricule' => ['required'],
            //'type_user' => ['required'],

        ];
    }
}
