New code for API 2

This commit is contained in:
Sander Dorigo
2022-06-23 09:33:43 +02:00
parent e0c9d3627e
commit b12d72bef6
13 changed files with 108 additions and 11 deletions

View File

@@ -104,7 +104,7 @@ class StoreRequest extends FormRequest
$type = $this->convertString('type');
$rules = [
'name' => 'required|min:1|uniqueAccountForUser',
'type' => 'required|' . sprintf('in:%s', $types),
'type' => 'required|min:1|' . sprintf('in:%s', $types),
'iban' => ['iban', 'nullable', new UniqueIban(null, $type)],
'bic' => 'bic|nullable',
'account_number' => ['between:1,255', 'nullable', new UniqueAccountNumber(null, $type)],