Files
myocardial/app/Http/Requests/DiagnoseRequest.php
T
2026-06-23 13:28:38 +07:00

53 lines
973 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Validation\Rules\File;
use Illuminate\Validation\Rule;
class DiagnoseRequest extends BaseFormRequest
{
/**
* Get the validation rules that apply to the post request.
*
* @return array
*/
public function store()
{
return [
'diagnoses' => [
Rule::in(['normal','warning','danger']),
'required'
],
'file' => [
'required',
File::types(['mp3','wav'])
->max(2 * 1024),
]
];
}
/**
* Get the validation rules that apply to the put/patch request.
*
* @return array
*/
public function update()
{
return [
];
}
/**
* Get the validation rules that apply to the delete request.
*
* @return array
*/
public function destroy()
{
return [
];
}
}