Smaller notes

This commit is contained in:
James Cole
2024-01-04 11:41:03 +01:00
parent 72a2d417af
commit c32044a8eb
15 changed files with 73 additions and 69 deletions

View File

@@ -116,7 +116,7 @@ class AccountFormRequest extends FormRequest
'amount_currency_id_virtual_balance' => 'exists:transaction_currencies,id',
'what' => 'in:'.$types,
'interest_period' => 'in:daily,monthly,yearly',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
$rules = Location::requestRules($rules);

View File

@@ -54,7 +54,7 @@ class AttachmentFormRequest extends FormRequest
// fixed
return [
'title' => 'between:1,255|nullable',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
}
}

View File

@@ -69,7 +69,7 @@ class BillStoreRequest extends FormRequest
'amount_max' => ['required', new IsValidPositiveAmount()],
'transaction_currency_id' => 'required|exists:transaction_currencies,id',
'date' => 'required|date',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
'bill_end_date' => 'nullable|date',
'extension_date' => 'nullable|date',
'repeat_freq' => sprintf('required|in:%s', implode(',', config('firefly.bill_periods'))),

View File

@@ -78,7 +78,7 @@ class BillUpdateRequest extends FormRequest
'repeat_freq' => sprintf('required|in:%s', implode(',', config('firefly.bill_periods'))),
'skip' => 'required|integer|gte:0|lte:31',
'active' => 'boolean',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
}
}

View File

@@ -67,7 +67,7 @@ class BudgetFormStoreRequest extends FormRequest
'auto_budget_currency_id' => 'exists:transaction_currencies,id',
'auto_budget_amount' => ['required_if:auto_budget_type,1', 'required_if:auto_budget_type,2', new IsValidPositiveAmount()],
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
}

View File

@@ -76,7 +76,7 @@ class BudgetFormUpdateRequest extends FormRequest
'auto_budget_currency_id' => 'exists:transaction_currencies,id',
'auto_budget_amount' => ['required_if:auto_budget_type,1', 'required_if:auto_budget_type,2|numeric', new IsValidPositiveAmount()],
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
}

View File

@@ -64,7 +64,7 @@ class CategoryFormRequest extends FormRequest
// fixed
return [
'name' => $nameRule,
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
}
}

View File

@@ -65,7 +65,7 @@ class PiggyBankStoreRequest extends FormRequest
'targetdate' => 'date|nullable',
'order' => 'integer|min:1',
'object_group' => 'min:0|max:255',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
}
}

View File

@@ -69,7 +69,7 @@ class PiggyBankUpdateRequest extends FormRequest
'targetdate' => 'date|nullable',
'order' => 'integer|max:65536|min:1',
'object_group' => 'min:0|max:255',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
];
}
}

View File

@@ -160,10 +160,10 @@ class RecurrenceFormRequest extends FormRequest
$rules = [
// mandatory info for recurrence.
'title' => 'required|between:1,255|uniqueObjectForUser:recurrences,title',
'first_date' => sprintf('required|date|before:%s|after:%s',$before->format('Y-m-d'),$today->format('Y-m-d')),
'first_date' => sprintf('required|date|before:%s|after:%s', $before->format('Y-m-d'), $today->format('Y-m-d')),
'repetition_type' => ['required', new ValidRecurrenceRepetitionValue(), new ValidRecurrenceRepetitionType(), 'between:1,20'],
'skip' => 'required|numeric|integer|gte:0|lte:31',
'notes' => 'between:1,65536|nullable',
'notes' => 'min:1|max:32768|nullable',
// optional for recurrence:
'recurring_description' => 'between:0,65000',
'active' => 'numeric|between:0,1',