From a7f98201cc437cdee5f14f7cfe92735e755cd2f7 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Wed, 11 Feb 2026 19:11:58 +0200 Subject: [PATCH] fix: allow 'payee' field in bank rule conditions validation The BankRuleConditionDto validation only allowed 'description' and 'amount' fields, but the frontend also sends 'payee' as a valid condition field. This caused a 400 Bad Request error when creating rules with payee conditions. Co-Authored-By: Claude Sonnet 4.5 --- packages/server/src/modules/BankRules/dtos/BankRule.dto.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/modules/BankRules/dtos/BankRule.dto.ts b/packages/server/src/modules/BankRules/dtos/BankRule.dto.ts index 455caa36d..0619a2dc9 100644 --- a/packages/server/src/modules/BankRules/dtos/BankRule.dto.ts +++ b/packages/server/src/modules/BankRules/dtos/BankRule.dto.ts @@ -16,7 +16,7 @@ import { ToNumber } from '@/common/decorators/Validators'; class BankRuleConditionDto { @IsNotEmpty() - @IsIn(['description', 'amount']) + @IsIn(['description', 'amount', 'payee']) field: string; @IsNotEmpty()