<?php

namespace App\Http\Requests\Procurement;

use App\Traits\RequestApiFormValidation;
use Illuminate\Foundation\Http\FormRequest;

class ProofRequest extends FormRequest
{
    use RequestApiFormValidation;
    /**
     * 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 [
            'owner_id'=>'required',
            'owner_material_id'=>'required',
        ];
    }

    public function messages()
    {
        return [
            'owner_id.required' => '项目必选',
            'owner_material_id.required' => '项目耗材编码必选',
        ];
    }
}
