This commit is contained in:
James Cole
2020-10-04 16:50:16 +02:00
parent 7bd0b09711
commit a5c37f1e4a

View File

@@ -335,6 +335,11 @@ class FireflyValidator extends Validator
return '' !== $value;
}
// check if it's an existing account.
if (in_array($triggerType, ['destination_account_id', 'source_account_id'])) {
return is_numeric($value) && (int) $value > 0;
}
// check transaction type.
if ('transaction_type' === $triggerType) {
$count = TransactionType::where('type', ucfirst($value))->count();