Skip to content

Firefly III: a personal finances manager

Must be above zero.

James Cole268cec6d08ed
diff --git a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
index df6fd4ba4d..d6fe2c6bce 100644
--- a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
+++ b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php
@@ -93,7 +93,7 @@ class StoreRequest extends FormRequest
// amount
'transactions.*.amount' => 'required|numeric|gt:0|max:1000000000',
- 'transactions.*.foreign_amount' => 'numeric|max:1000000000',
+ 'transactions.*.foreign_amount' => 'numeric|max:1000000000|gt:0|',
// description
'transactions.*.description' => 'nullable|between:1,1000',
diff --git a/app/Api/V2/Request/Model/Transaction/StoreRequest.php b/app/Api/V2/Request/Model/Transaction/StoreRequest.php
index 72af551fb8..271f5fbd9d 100644
--- a/app/Api/V2/Request/Model/Transaction/StoreRequest.php
+++ b/app/Api/V2/Request/Model/Transaction/StoreRequest.php
@@ -107,8 +107,8 @@ class StoreRequest extends FormRequest
'transactions.*.foreign_currency_code' => 'min:3|max:51|exists:transaction_currencies,code|nullable',
// amount
- 'transactions.*.amount' => 'required|numeric|gt:0',
- 'transactions.*.foreign_amount' => 'numeric',
+ 'transactions.*.amount' => 'required|numeric|gt:0|max:1000000000',
+ 'transactions.*.foreign_amount' => 'numeric|gt:0|max:1000000000',
// description
'transactions.*.description' => 'nullable|between:1,1000',