Files
anonaddy/app/Http/Requests/ImportAliasesRequest.php
2023-04-26 16:53:39 +01:00

35 lines
672 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rules\File;
class ImportAliasesRequest 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<string, mixed>
*/
public function rules()
{
return [
'aliases_import' => [
'required',
File::types('csv')->min(0.1)->max(1024), // 1MB
],
];
}
}