mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Replace enum
This commit is contained in:
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
use FireflyIII\Enums\TransactionTypeEnum;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\CategoryFactory;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
@@ -243,7 +244,7 @@ class RecurrenceFormRequest extends FormRequest
|
||||
|
||||
// switch on type to expand rules for source and destination accounts:
|
||||
$type = strtolower($this->convertString('transaction_type'));
|
||||
if (strtolower(TransactionType::WITHDRAWAL) === $type) {
|
||||
if (strtolower(TransactionTypeEnum::WITHDRAWAL->value) === $type) {
|
||||
$rules['source_id'] = 'required|exists:accounts,id|belongsToUser:accounts';
|
||||
$rules['destination_name'] = 'min:1|max:255|nullable';
|
||||
}
|
||||
|
Reference in New Issue
Block a user