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
26 lines
912 B
PHP
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'],
|
|
];
|
|
}
|
|
}
|