Smaller max size

This commit is contained in:
James Cole 2024-01-08 12:56:57 +01:00
parent ad981c2bf0
commit fcc0294d07
7 changed files with 7 additions and 7 deletions

View File

@ -71,7 +71,7 @@ class ExportRequest extends FormRequest
{
return [
'type' => 'in:csv',
'accounts' => 'min:1|max:65536',
'accounts' => 'min:1|max:32768',
'start' => 'date|before:end',
'end' => 'date|after:start',
];

View File

@ -119,7 +119,7 @@ class StoreRequest extends FormRequest
'liability_direction' => 'nullable|required_if:type,liability|required_if:type,liabilities|in:credit,debit',
'interest' => 'min:0|max:100|numeric',
'interest_period' => sprintf('nullable|in:%s', implode(',', config('firefly.interest_periods'))),
'notes' => 'min:0|max:65536',
'notes' => 'min:0|max:32768',
];
return Location::requestRules($rules);

View File

@ -107,7 +107,7 @@ class UpdateRequest extends FormRequest
'liability_direction' => 'required_if:type,liability|in:credit,debit',
'interest' => 'required_if:type,liability|min:0|max:100|numeric',
'interest_period' => 'required_if:type,liability|in:daily,monthly,yearly',
'notes' => 'min:0|max:65536',
'notes' => 'min:0|max:32768',
];
return Location::requestRules($rules);

View File

@ -60,7 +60,7 @@ class StoreRequest extends FormRequest
{
$rules = [
'tag' => 'required|min:1|uniqueObjectForUser:tags,tag|max:1024',
'description' => 'min:1|nullable|max:65536',
'description' => 'min:1|nullable|max:32768',
'date' => 'date|nullable',
];

View File

@ -66,7 +66,7 @@ class UpdateRequest extends FormRequest
// TODO check if uniqueObjectForUser is obsolete
$rules = [
'tag' => 'min:1|max:1024|uniqueObjectForUser:tags,tag,'.$tag->id,
'description' => 'min:1|nullable|max:65536',
'description' => 'min:1|nullable|max:32768',
'date' => 'date|nullable',
];

View File

@ -67,7 +67,7 @@ class PiggyBankUpdateRequest extends FormRequest
'targetamount' => ['nullable', new IsValidPositiveAmount()],
'startdate' => 'date',
'targetdate' => 'date|nullable',
'order' => 'integer|max:65536|min:1',
'order' => 'integer|max:32768|min:1',
'object_group' => 'min:0|max:255',
'notes' => 'min:1|max:32768|nullable',
];

View File

@ -71,7 +71,7 @@ class TagFormRequest extends FormRequest
$rules = [
'tag' => $tagRule,
'id' => $idRule,
'description' => 'max:65536|min:1|nullable',
'description' => 'max:32768|min:1|nullable',
'date' => 'date|nullable',
];