Clean up min/max sizes of requests.

This commit is contained in:
James Cole
2024-01-05 09:48:59 +01:00
parent 68edcfc4e8
commit fe7bb02dc5
46 changed files with 156 additions and 156 deletions

View File

@@ -75,7 +75,7 @@ class UpdateRequest extends FormRequest
$bill = $this->route()->parameter('bill');
return [
'name' => sprintf('between:1,255|uniqueObjectForUser:bills,name,%d', $bill->id),
'name' => sprintf('min:1|max:255|uniqueObjectForUser:bills,name,%d', $bill->id),
'amount_min' => ['nullable', new IsValidPositiveAmount()],
'amount_max' => ['nullable', new IsValidPositiveAmount()],
'currency_id' => 'numeric|exists:transaction_currencies,id',
@@ -84,7 +84,7 @@ class UpdateRequest extends FormRequest
'end_date' => 'date|after:date',
'extension_date' => 'date|after:date',
'repeat_freq' => 'in:weekly,monthly,quarterly,half-year,yearly',
'skip' => 'between:0,31',
'skip' => 'min:0|max:31|numeric',
'active' => [new IsBoolean()],
'notes' => 'min:1|max:32768',
];