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