mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Fix validation #1720
This commit is contained in:
@@ -292,9 +292,10 @@ class FireflyValidator extends Validator
|
||||
if ('convert_transfer' === $actionType) {
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$account = $repository->findByName($value,
|
||||
[AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE,
|
||||
AccountType::CREDITCARD]
|
||||
$account = $repository->findByName(
|
||||
$value,
|
||||
[AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE,
|
||||
AccountType::CREDITCARD]
|
||||
);
|
||||
|
||||
return null !== $account;
|
||||
@@ -344,9 +345,9 @@ class FireflyValidator extends Validator
|
||||
|
||||
// check transaction type.
|
||||
if ('transaction_type' === $triggerType) {
|
||||
$count = TransactionType::where('type', $value)->count();
|
||||
$count = TransactionType::where('type', strtolower($value))->count();
|
||||
|
||||
return 1 !== $count;
|
||||
return 1 === $count;
|
||||
}
|
||||
|
||||
// and finally a "will match everything check":
|
||||
|
Reference in New Issue
Block a user