Update validators so they can handle one field at a time.

This commit is contained in:
James Cole
2021-03-10 06:34:03 +01:00
parent 5f4b025be5
commit 238a582d8a
23 changed files with 413 additions and 223 deletions

View File

@@ -61,8 +61,6 @@ class UpdateRequest extends FormRequest
'include_net_worth' => $includeNetWorth,
'account_type' => $this->nullableString('type'),
'account_type_id' => null,
'currency_id' => $this->nullableInteger('currency_id'),
'currency_code' => $this->nullableString('currency_code'),
'virtual_balance' => $this->nullableString('virtual_balance'),
'iban' => $this->nullableString('iban'),
'BIC' => $this->nullableString('bic'),
@@ -80,6 +78,12 @@ class UpdateRequest extends FormRequest
if (null !== $this->get('order')) {
$data['order'] = $this->integer('order');
}
if (null !== $this->get('currency_id')) {
$data['currency_id'] = $this->nullableInteger('currency_id');
}
if (null !== $this->get('currency_code')) {
$data['currency_code'] = $this->nullableString('currency_code');
}
$data = $this->appendLocationData($data, null);