Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
25 lines
667 B
PHP
25 lines
667 B
PHP
<?php
|
|
|
|
namespace Modules\EcommerceFinance\Http\Requests;
|
|
|
|
use App\Abstracts\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class ImportBatch extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'store_id' => ['required', 'integer', Rule::exists('ec_stores', 'id')->where('company_id', company_id())],
|
|
'source_type' => ['required', Rule::in(['orders', 'settlements'])],
|
|
'source_file' => ['required', 'string', 'max:255'],
|
|
'checksum' => ['required', 'string', 'size:64', 'regex:/^[a-f0-9]{64}$/i'],
|
|
];
|
|
}
|
|
}
|