<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class warehouseRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        $rules = [];
        $rules['name'] = 'required';
        $rules['establishment_id'] = 'required';

        return $rules;
    }

    public function messages()
    {
        $messages = [];
        $messages['name.required'] = 'El nombre es requerido.';
        $messages['stablishment_id.required'] = 'Debe seleccionar un Establecimiento.';

        return $messages;
    }
}
