CaiWuXiTong/app/Http/Requests/Banking/FundAccount.php
WuYongJie 9595267ee7
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
chore: 导入 Akaunting 初始源码与团队协作规则
2026-07-20 18:20:25 +08:00

26 lines
912 B
PHP

<?php
namespace App\Http\Requests\Banking;
use App\Abstracts\Http\FormRequest;
use Illuminate\Validation\Rule;
class FundAccount extends FormRequest
{
public function rules(): array
{
$platform = $this->route('platform');
return [
'company_name' => ['required', 'string', 'max:191'],
'account_name' => [Rule::requiredIf($platform !== 'bank'), 'nullable', 'string', 'max:191'],
'account_number' => ['required', 'string', 'max:191'],
'bank_name' => [Rule::requiredIf($platform === 'bank'), 'nullable', 'string', 'max:191'],
'bank_type' => [Rule::requiredIf($platform === 'bank'), 'nullable', 'string', 'max:191'],
'login_password' => ['nullable', 'string', 'max:191'],
'reserved_phone' => ['nullable', 'string', 'max:191'],
'notes' => ['nullable', 'string', 'max:2000'],
];
}
}