mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
This commit is contained in:
@@ -69,7 +69,7 @@ class BillStoreRequest extends FormRequest
|
|||||||
'transaction_currency_id' => 'required|exists:transaction_currencies,id',
|
'transaction_currency_id' => 'required|exists:transaction_currencies,id',
|
||||||
'date' => 'required|date',
|
'date' => 'required|date',
|
||||||
'repeat_freq' => 'required|in:weekly,monthly,quarterly,half-year,yearly',
|
'repeat_freq' => 'required|in:weekly,monthly,quarterly,half-year,yearly',
|
||||||
'skip' => 'required|between:0,31',
|
'skip' => 'required|integer|gte:0|lte:31',
|
||||||
'active' => 'boolean',
|
'active' => 'boolean',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -73,7 +73,7 @@ class BillUpdateRequest extends FormRequest
|
|||||||
'transaction_currency_id' => 'required|exists:transaction_currencies,id',
|
'transaction_currency_id' => 'required|exists:transaction_currencies,id',
|
||||||
'date' => 'required|date',
|
'date' => 'required|date',
|
||||||
'repeat_freq' => 'required|in:weekly,monthly,quarterly,half-year,yearly',
|
'repeat_freq' => 'required|in:weekly,monthly,quarterly,half-year,yearly',
|
||||||
'skip' => 'required|between:0,31',
|
'skip' => 'required|integer|gte:0|lte:31',
|
||||||
'active' => 'boolean',
|
'active' => 'boolean',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,7 @@ class BudgetFormStoreRequest extends FormRequest
|
|||||||
return [
|
return [
|
||||||
'name' => 'required|between:1,100|uniqueObjectForUser:budgets,name',
|
'name' => 'required|between:1,100|uniqueObjectForUser:budgets,name',
|
||||||
'active' => 'numeric|between:0,1',
|
'active' => 'numeric|between:0,1',
|
||||||
'auto_budget_type' => 'numeric|between:0,2',
|
'auto_budget_type' => 'numeric|integer|gte:0|lte:2',
|
||||||
'auto_budget_currency_id' => 'exists:transaction_currencies,id',
|
'auto_budget_currency_id' => 'exists:transaction_currencies,id',
|
||||||
'auto_budget_amount' => 'min:0|max:1000000000|required_if:auto_budget_type,1|required_if:auto_budget_type,2',
|
'auto_budget_amount' => 'min:0|max:1000000000|required_if:auto_budget_type,1|required_if:auto_budget_type,2',
|
||||||
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly',
|
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly',
|
||||||
|
@@ -73,7 +73,7 @@ class BudgetFormUpdateRequest extends FormRequest
|
|||||||
return [
|
return [
|
||||||
'name' => $nameRule,
|
'name' => $nameRule,
|
||||||
'active' => 'numeric|between:0,1',
|
'active' => 'numeric|between:0,1',
|
||||||
'auto_budget_type' => 'numeric|between:0,2',
|
'auto_budget_type' => 'numeric|integer|gte:0|lte:31',
|
||||||
'auto_budget_currency_id' => 'exists:transaction_currencies,id',
|
'auto_budget_currency_id' => 'exists:transaction_currencies,id',
|
||||||
'auto_budget_amount' => 'min:0|max:1000000000|required_if:auto_budget_type,1|required_if:auto_budget_type,2',
|
'auto_budget_amount' => 'min:0|max:1000000000|required_if:auto_budget_type,1|required_if:auto_budget_type,2',
|
||||||
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly',
|
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly',
|
||||||
|
@@ -192,7 +192,7 @@ class RecurrenceFormRequest extends FormRequest
|
|||||||
'title' => 'required|between:1,255|uniqueObjectForUser:recurrences,title',
|
'title' => 'required|between:1,255|uniqueObjectForUser:recurrences,title',
|
||||||
'first_date' => 'required|date|after:' . $today->format('Y-m-d'),
|
'first_date' => 'required|date|after:' . $today->format('Y-m-d'),
|
||||||
'repetition_type' => ['required', new ValidRecurrenceRepetitionValue, new ValidRecurrenceRepetitionType, 'between:1,20'],
|
'repetition_type' => ['required', new ValidRecurrenceRepetitionValue, new ValidRecurrenceRepetitionType, 'between:1,20'],
|
||||||
'skip' => 'required|numeric|between:0,31',
|
'skip' => 'required|numeric|integer|gte:0|lte:31',
|
||||||
|
|
||||||
// optional for recurrence:
|
// optional for recurrence:
|
||||||
'recurring_description' => 'between:0,65000',
|
'recurring_description' => 'between:0,65000',
|
||||||
|
Reference in New Issue
Block a user