Validate account info

This commit is contained in:
James Cole
2019-04-06 11:08:46 +02:00
parent c519b4d0df
commit 47fdf4b1a2
3 changed files with 99 additions and 77 deletions

View File

@@ -240,6 +240,9 @@ class TransactionUpdateRequest extends Request
// if type is set, source + destination info is mandatory.
$this->validateAccountPresence($validator);
// validate source/destination is equal, depending on the transaction journal type.
$this->validateEqualAccountsForUpdate($validator, $transactionGroup);
// TODO validate that the currency fits the source and/or destination account.
// all journals must have a description