mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Fix limits
This commit is contained in:
@@ -101,11 +101,11 @@ class AccountFormRequest extends FormRequest
|
|||||||
$ccPaymentTypes = implode(',', array_keys(config('firefly.ccTypes')));
|
$ccPaymentTypes = implode(',', array_keys(config('firefly.ccTypes')));
|
||||||
$rules = [
|
$rules = [
|
||||||
'name' => 'required|max:1024|min:1|uniqueAccountForUser',
|
'name' => 'required|max:1024|min:1|uniqueAccountForUser',
|
||||||
'opening_balance' => 'numeric|nullable|max:1000000000',
|
'opening_balance' => 'numeric|nullable|max:1000000000|min:-1000000000',
|
||||||
'opening_balance_date' => 'date|required_with:opening_balance|nullable',
|
'opening_balance_date' => 'date|required_with:opening_balance|nullable',
|
||||||
'iban' => ['iban', 'nullable', new UniqueIban(null, $this->convertString('objectType'))],
|
'iban' => ['iban', 'nullable', new UniqueIban(null, $this->convertString('objectType'))],
|
||||||
'BIC' => 'bic|nullable',
|
'BIC' => 'bic|nullable',
|
||||||
'virtual_balance' => 'numeric|nullable|max:1000000000',
|
'virtual_balance' => 'numeric|nullable|max:1000000000|min:-1000000000',
|
||||||
'currency_id' => 'exists:transaction_currencies,id',
|
'currency_id' => 'exists:transaction_currencies,id',
|
||||||
'account_number' => 'between:1,255|uniqueAccountNumberForUser|nullable',
|
'account_number' => 'between:1,255|uniqueAccountNumberForUser|nullable',
|
||||||
'account_role' => 'in:'.$accountRoles,
|
'account_role' => 'in:'.$accountRoles,
|
||||||
|
@@ -43,9 +43,9 @@ class NewUserFormRequest extends FormRequest
|
|||||||
// fixed
|
// fixed
|
||||||
return [
|
return [
|
||||||
'bank_name' => 'required|between:1,200',
|
'bank_name' => 'required|between:1,200',
|
||||||
'bank_balance' => 'required|numeric|max:1000000000',
|
'bank_balance' => 'required|numeric|max:1000000000|min:-1000000000',
|
||||||
'savings_balance' => 'numeric|max:1000000000',
|
'savings_balance' => 'numeric|max:1000000000|min:-1000000000',
|
||||||
'credit_card_limit' => 'numeric|max:1000000000',
|
'credit_card_limit' => 'numeric|max:1000000000|min:-1000000000',
|
||||||
'amount_currency_id_bank_balance' => 'exists:transaction_currencies,id',
|
'amount_currency_id_bank_balance' => 'exists:transaction_currencies,id',
|
||||||
'amount_currency_id_savings_balance' => 'exists:transaction_currencies,id',
|
'amount_currency_id_savings_balance' => 'exists:transaction_currencies,id',
|
||||||
'amount_currency_id_credit_card_limit' => 'exists:transaction_currencies,id',
|
'amount_currency_id_credit_card_limit' => 'exists:transaction_currencies,id',
|
||||||
|
@@ -59,7 +59,7 @@ class PiggyBankStoreRequest extends FormRequest
|
|||||||
return [
|
return [
|
||||||
'name' => 'required|between:1,255|uniquePiggyBankForUser',
|
'name' => 'required|between:1,255|uniquePiggyBankForUser',
|
||||||
'account_id' => 'required|belongsToUser:accounts',
|
'account_id' => 'required|belongsToUser:accounts',
|
||||||
'targetamount' => 'nullable|numeric|max:1000000000',
|
'targetamount' => 'nullable|numeric|max:1000000000|min:-1000000000',
|
||||||
'startdate' => 'date',
|
'startdate' => 'date',
|
||||||
'targetdate' => 'date|nullable',
|
'targetdate' => 'date|nullable',
|
||||||
'order' => 'integer|min:1',
|
'order' => 'integer|min:1',
|
||||||
|
@@ -63,7 +63,7 @@ class PiggyBankUpdateRequest extends FormRequest
|
|||||||
return [
|
return [
|
||||||
'name' => sprintf('required|between:1,255|uniquePiggyBankForUser:%d', $piggy->id),
|
'name' => sprintf('required|between:1,255|uniquePiggyBankForUser:%d', $piggy->id),
|
||||||
'account_id' => 'required|belongsToUser:accounts',
|
'account_id' => 'required|belongsToUser:accounts',
|
||||||
'targetamount' => 'nullable|numeric|max:1000000000',
|
'targetamount' => 'nullable|numeric|max:1000000000|min:-1000000000',
|
||||||
'startdate' => 'date',
|
'startdate' => 'date',
|
||||||
'targetdate' => 'date|nullable',
|
'targetdate' => 'date|nullable',
|
||||||
'order' => 'integer|max:65536|min:1',
|
'order' => 'integer|max:65536|min:1',
|
||||||
|
@@ -67,9 +67,9 @@ class ReconciliationStoreRequest extends FormRequest
|
|||||||
return [
|
return [
|
||||||
'start' => 'required|date',
|
'start' => 'required|date',
|
||||||
'end' => 'required|date',
|
'end' => 'required|date',
|
||||||
'startBalance' => 'numeric|max:1000000000',
|
'startBalance' => 'numeric|max:1000000000|min:-1000000000',
|
||||||
'endBalance' => 'numeric|max:1000000000',
|
'endBalance' => 'numeric|max:1000000000|min:-1000000000',
|
||||||
'difference' => 'required|numeric|max:1000000000',
|
'difference' => 'required|numeric|max:1000000000|min:-1000000000',
|
||||||
'journals' => [new ValidJournals()],
|
'journals' => [new ValidJournals()],
|
||||||
'reconcile' => 'required|in:create,nothing',
|
'reconcile' => 'required|in:create,nothing',
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user