<?php
namespace App\Http\Requests\Admin\FileSystem;
use Illuminate\Foundation\Http\FormRequest;
class FileRequest 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 [
'file' => ['required', 'string', 'between:2,200'],
];
}
/**
* 获取验证错误的自定义属性。
*
* @return array
*/
public function attributes()
{
return [
'file' => __('message.file.file'),
];
}
/**
* 获取已定义验证规则的错误消息。
*
* @return array
*/
public function messages()
{
return [
];
}
}