<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class TestSampleCreateRequest 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 [
            'test_id' => 'required|integer|min:1',
            'sample_type_id' => 'required|integer|min:1',
            'group_result' => 'nullable|string',
            'unit_sign' => 'nullable|string',
            'heading_id' => 'nullable',
            'usd_price' => 'nullable',
            'code' => 'nullable',
            'wight' => 'nullable',
            'filed_type_id' => 'required|integer|min:0',
            //'patient_type_ids' => 'required_if:filed_type_id,1',
            //'organisms' => 'required_if:filed_type_id,2,3'
        ];
    }

}
