diff --git a/app/Api/V1/Requests/Autocomplete/AutocompleteRequest.php b/app/Api/V1/Requests/Autocomplete/AutocompleteRequest.php index 687d23ba5f..566624b060 100644 --- a/app/Api/V1/Requests/Autocomplete/AutocompleteRequest.php +++ b/app/Api/V1/Requests/Autocomplete/AutocompleteRequest.php @@ -58,7 +58,7 @@ class AutocompleteRequest extends FormRequest public function rules(): array { return [ - 'date' => 'date|after:1900-01-01|before:2099-12-31', + 'date' => 'date|after:1970-01-02|before:2038-01-17', ]; } } diff --git a/app/Api/V1/Requests/Chart/ChartRequest.php b/app/Api/V1/Requests/Chart/ChartRequest.php index 58ade4f0c3..2ef933a1c2 100644 --- a/app/Api/V1/Requests/Chart/ChartRequest.php +++ b/app/Api/V1/Requests/Chart/ChartRequest.php @@ -60,8 +60,8 @@ class ChartRequest extends FormRequest public function rules(): array { return [ - 'start' => 'required|date|after:1900-01-01|before:2099-12-31|before_or_equal:end', - 'end' => 'required|date|after:1900-01-01|before:2099-12-31|after_or_equal:start', + 'start' => 'required|date|after:1970-01-02|before:2038-01-17|before_or_equal:end', + 'end' => 'required|date|after:1970-01-02|before:2038-01-17|after_or_equal:start', 'preselected' => sprintf('nullable|in:%s', implode(',', config('firefly.preselected_accounts'))), 'period' => sprintf('nullable|in:%s', implode(',', config('firefly.valid_view_ranges'))), 'accounts.*' => 'exists:accounts,id', diff --git a/app/Api/V1/Requests/Data/DateRequest.php b/app/Api/V1/Requests/Data/DateRequest.php index deab07a2db..7ba1861086 100644 --- a/app/Api/V1/Requests/Data/DateRequest.php +++ b/app/Api/V1/Requests/Data/DateRequest.php @@ -65,9 +65,9 @@ class DateRequest extends FormRequest public function rules(): array { return [ - 'date' => 'date|after:1900-01-01|before:2099-12-31', - 'start' => 'date|after:1900-01-01|before:2099-12-31|before:end|required_with:end', - 'end' => 'date|after:1900-01-01|before:2099-12-31|after:start|required_with:start', + 'date' => 'date|after:1970-01-02|before:2038-01-17', + 'start' => 'date|after:1970-01-02|before:2038-01-17|before:end|required_with:end', + 'end' => 'date|after:1970-01-02|before:2038-01-17|after:start|required_with:start', ]; } } diff --git a/app/Api/V1/Requests/Generic/DateRequest.php b/app/Api/V1/Requests/Generic/DateRequest.php index c3840ac76b..599cdef49a 100644 --- a/app/Api/V1/Requests/Generic/DateRequest.php +++ b/app/Api/V1/Requests/Generic/DateRequest.php @@ -55,8 +55,8 @@ class DateRequest extends FormRequest public function rules(): array { return [ - 'start' => 'required|date|after:1900-01-01|before:2099-12-31', - 'end' => 'required|date|after_or_equal:start|before:2099-12-31|after:1900-01-01', + 'start' => 'required|date|after:1970-01-02|before:2038-01-17', + 'end' => 'required|date|after_or_equal:start|before:2038-01-17|after:1970-01-02', ]; } } diff --git a/app/Api/V1/Requests/Generic/SingleDateRequest.php b/app/Api/V1/Requests/Generic/SingleDateRequest.php index 2e4842433b..14e3c5fc02 100644 --- a/app/Api/V1/Requests/Generic/SingleDateRequest.php +++ b/app/Api/V1/Requests/Generic/SingleDateRequest.php @@ -53,7 +53,7 @@ class SingleDateRequest extends FormRequest public function rules(): array { return [ - 'date' => 'required|date|after:1900-01-01|before:2099-12-31', + 'date' => 'required|date|after:1970-01-02|before:2038-01-17', ]; } } diff --git a/app/Api/V1/Requests/Models/AvailableBudget/Request.php b/app/Api/V1/Requests/Models/AvailableBudget/Request.php index ad36cdb728..93b3f732b0 100644 --- a/app/Api/V1/Requests/Models/AvailableBudget/Request.php +++ b/app/Api/V1/Requests/Models/AvailableBudget/Request.php @@ -66,8 +66,8 @@ class Request extends FormRequest 'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code', 'amount' => ['nullable', new IsValidPositiveAmount()], - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after:1970-01-02|before:2038-01-17', ]; } diff --git a/app/Api/V1/Requests/Models/Bill/StoreRequest.php b/app/Api/V1/Requests/Models/Bill/StoreRequest.php index 727eb9afed..46b0027e7e 100644 --- a/app/Api/V1/Requests/Models/Bill/StoreRequest.php +++ b/app/Api/V1/Requests/Models/Bill/StoreRequest.php @@ -80,9 +80,9 @@ class StoreRequest extends FormRequest 'amount_max' => ['required', new IsValidPositiveAmount()], 'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code', - 'date' => 'date|required|after:1900-01-01|before:2099-12-31', - 'end_date' => 'nullable|date|after:date|after:1900-01-01|before:2099-12-31', - 'extension_date' => 'nullable|date|after:date|after:1900-01-01|before:2099-12-31', + 'date' => 'date|required|after:1970-01-02|before:2038-01-17', + 'end_date' => 'nullable|date|after:date|after:1970-01-02|before:2038-01-17', + 'extension_date' => 'nullable|date|after:date|after:1970-01-02|before:2038-01-17', 'repeat_freq' => 'in:weekly,monthly,quarterly,half-year,yearly|required', 'skip' => 'min:0|max:31|numeric', 'active' => [new IsBoolean()], diff --git a/app/Api/V1/Requests/Models/Bill/UpdateRequest.php b/app/Api/V1/Requests/Models/Bill/UpdateRequest.php index 4b69d4d6ee..149f5ad4b7 100644 --- a/app/Api/V1/Requests/Models/Bill/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Bill/UpdateRequest.php @@ -81,9 +81,9 @@ class UpdateRequest extends FormRequest 'amount_max' => ['nullable', new IsValidPositiveAmount()], 'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code', - 'date' => 'date|after:1900-01-01|before:2099-12-31', - 'end_date' => 'date|after:date|after:1900-01-01|before:2099-12-31', - 'extension_date' => 'date|after:date|after:1900-01-01|before:2099-12-31', + 'date' => 'date|after:1970-01-02|before:2038-01-17', + 'end_date' => 'date|after:date|after:1970-01-02|before:2038-01-17', + 'extension_date' => 'date|after:date|after:1970-01-02|before:2038-01-17', 'repeat_freq' => 'in:weekly,monthly,quarterly,half-year,yearly', 'skip' => 'min:0|max:31|numeric', 'active' => [new IsBoolean()], diff --git a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php index c1ed04a9a4..3c0fc08c37 100644 --- a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php @@ -67,8 +67,8 @@ class UpdateRequest extends FormRequest public function rules(): array { return [ - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after:1970-01-02|before:2038-01-17', 'amount' => ['nullable', new IsValidPositiveAmount()], 'currency_id' => 'numeric|exists:transaction_currencies,id', 'currency_code' => 'min:3|max:51|exists:transaction_currencies,code', diff --git a/app/Api/V1/Requests/Models/CurrencyExchangeRate/DestroyRequest.php b/app/Api/V1/Requests/Models/CurrencyExchangeRate/DestroyRequest.php index 451cf53126..1762d7348c 100644 --- a/app/Api/V1/Requests/Models/CurrencyExchangeRate/DestroyRequest.php +++ b/app/Api/V1/Requests/Models/CurrencyExchangeRate/DestroyRequest.php @@ -45,7 +45,7 @@ class DestroyRequest extends FormRequest public function rules(): array { return [ - 'date' => 'required|date|after:1900-01-01|before:2099-12-31', + 'date' => 'required|date|after:1970-01-02|before:2038-01-17', ]; } } diff --git a/app/Api/V1/Requests/Models/CurrencyExchangeRate/StoreRequest.php b/app/Api/V1/Requests/Models/CurrencyExchangeRate/StoreRequest.php index f29dd31fa2..b4ef5d13b8 100644 --- a/app/Api/V1/Requests/Models/CurrencyExchangeRate/StoreRequest.php +++ b/app/Api/V1/Requests/Models/CurrencyExchangeRate/StoreRequest.php @@ -61,7 +61,7 @@ class StoreRequest extends FormRequest public function rules(): array { return [ - 'date' => 'required|date|after:1900-01-01|before:2099-12-31', + 'date' => 'required|date|after:1970-01-02|before:2038-01-17', 'rate' => 'required|numeric|gt:0', 'from' => 'required|exists:transaction_currencies,code', 'to' => 'required|exists:transaction_currencies,code', diff --git a/app/Api/V1/Requests/Models/CurrencyExchangeRate/UpdateRequest.php b/app/Api/V1/Requests/Models/CurrencyExchangeRate/UpdateRequest.php index e244895daa..ab37c34114 100644 --- a/app/Api/V1/Requests/Models/CurrencyExchangeRate/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/CurrencyExchangeRate/UpdateRequest.php @@ -50,7 +50,7 @@ class UpdateRequest extends FormRequest public function rules(): array { return [ - 'date' => 'date|after:1900-01-01|before:2099-12-31', + 'date' => 'date|after:1970-01-02|before:2038-01-17', 'rate' => 'required|numeric|gt:0', ]; } diff --git a/app/Api/V1/Requests/Models/Recurrence/UpdateRequest.php b/app/Api/V1/Requests/Models/Recurrence/UpdateRequest.php index bd8a26f1c2..f16c521590 100644 --- a/app/Api/V1/Requests/Models/Recurrence/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Recurrence/UpdateRequest.php @@ -154,7 +154,7 @@ class UpdateRequest extends FormRequest return [ 'title' => sprintf('min:1|max:255|uniqueObjectForUser:recurrences,title,%d', $recurrence->id), 'description' => 'min:1|max:32768', - 'first_date' => 'date|after:1900-01-01|before:2099-12-31', + 'first_date' => 'date|after:1970-01-02|before:2038-01-17', 'apply_rules' => [new IsBoolean()], 'active' => [new IsBoolean()], 'repeat_until' => 'nullable|date', diff --git a/app/Api/V1/Requests/Models/Rule/TestRequest.php b/app/Api/V1/Requests/Models/Rule/TestRequest.php index 27490d14f4..ef855b9c85 100644 --- a/app/Api/V1/Requests/Models/Rule/TestRequest.php +++ b/app/Api/V1/Requests/Models/Rule/TestRequest.php @@ -71,8 +71,8 @@ class TestRequest extends FormRequest public function rules(): array { return [ - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after_or_equal:start|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after_or_equal:start|after:1970-01-02|before:2038-01-17', 'accounts' => '', 'accounts.*' => 'required|exists:accounts,id|belongsToUser:accounts', ]; diff --git a/app/Api/V1/Requests/Models/Rule/TriggerRequest.php b/app/Api/V1/Requests/Models/Rule/TriggerRequest.php index 07a4feb7d1..42f4417aca 100644 --- a/app/Api/V1/Requests/Models/Rule/TriggerRequest.php +++ b/app/Api/V1/Requests/Models/Rule/TriggerRequest.php @@ -65,8 +65,8 @@ class TriggerRequest extends FormRequest public function rules(): array { return [ - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after_or_equal:start|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after_or_equal:start|after:1970-01-02|before:2038-01-17', 'accounts' => '', 'accounts.*' => 'exists:accounts,id|belongsToUser:accounts', ]; diff --git a/app/Api/V1/Requests/Models/RuleGroup/TestRequest.php b/app/Api/V1/Requests/Models/RuleGroup/TestRequest.php index 34fa7231e5..68c7bfb219 100644 --- a/app/Api/V1/Requests/Models/RuleGroup/TestRequest.php +++ b/app/Api/V1/Requests/Models/RuleGroup/TestRequest.php @@ -65,8 +65,8 @@ class TestRequest extends FormRequest public function rules(): array { return [ - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after_or_equal:start|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after_or_equal:start|after:1970-01-02|before:2038-01-17', 'accounts' => '', 'accounts.*' => 'exists:accounts,id|belongsToUser:accounts', ]; diff --git a/app/Api/V1/Requests/Models/RuleGroup/TriggerRequest.php b/app/Api/V1/Requests/Models/RuleGroup/TriggerRequest.php index 97038d6ef2..67e7fd4e09 100644 --- a/app/Api/V1/Requests/Models/RuleGroup/TriggerRequest.php +++ b/app/Api/V1/Requests/Models/RuleGroup/TriggerRequest.php @@ -69,8 +69,8 @@ class TriggerRequest extends FormRequest public function rules(): array { return [ - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after_or_equal:start|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after_or_equal:start|after:1970-01-02|before:2038-01-17', ]; } } diff --git a/app/Api/V1/Requests/Models/Tag/StoreRequest.php b/app/Api/V1/Requests/Models/Tag/StoreRequest.php index 2041d8f4b7..aeb51632bd 100644 --- a/app/Api/V1/Requests/Models/Tag/StoreRequest.php +++ b/app/Api/V1/Requests/Models/Tag/StoreRequest.php @@ -62,7 +62,7 @@ class StoreRequest extends FormRequest $rules = [ 'tag' => 'required|min:1|uniqueObjectForUser:tags,tag|max:1024', 'description' => 'min:1|nullable|max:32768', - 'date' => 'date|nullable|after:1900-01-01|before:2099-12-31', + 'date' => 'date|nullable|after:1970-01-02|before:2038-01-17', ]; return Location::requestRules($rules); diff --git a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php index 8ecf7f71a2..37417dfdb2 100644 --- a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php @@ -66,7 +66,7 @@ class UpdateRequest extends FormRequest $rules = [ 'tag' => 'min:1|max:1024|uniqueObjectForUser:tags,tag,'.$tag->id, 'description' => 'min:1|nullable|max:32768', - 'date' => 'date|nullable|after:1900-01-01|before:2099-12-31', + 'date' => 'date|nullable|after:1970-01-02|before:2038-01-17', ]; return Location::requestRules($rules); diff --git a/app/Api/V1/Requests/System/CronRequest.php b/app/Api/V1/Requests/System/CronRequest.php index ec57cfeb96..1ffebd0494 100644 --- a/app/Api/V1/Requests/System/CronRequest.php +++ b/app/Api/V1/Requests/System/CronRequest.php @@ -73,7 +73,7 @@ class CronRequest extends FormRequest { return [ 'force' => 'in:true,false', - 'date' => 'nullable|date|after:1900-01-01|before:2099-12-31', + 'date' => 'nullable|date|after:1970-01-02|before:2038-01-17', ]; } } diff --git a/app/Api/V2/Controllers/Controller.php b/app/Api/V2/Controllers/Controller.php index e9da840908..6117197914 100644 --- a/app/Api/V2/Controllers/Controller.php +++ b/app/Api/V2/Controllers/Controller.php @@ -116,7 +116,7 @@ class Controller extends BaseController app('log')->warning(sprintf('Ignored invalid date "%s" in API v2 controller parameter check: %s', substr((string) $date, 0, 20), $e->getMessage())); } // out of range? set to null. - if ($obj instanceof Carbon && ($obj->year <= 1900 || $obj->year > 2099)) { + if ($obj instanceof Carbon && ($obj->year <= 1970 || $obj->year > 2038)) { app('log')->warning(sprintf('Refuse to use date "%s" in API v2 controller parameter check: %s', $field, $obj->toAtomString())); $obj = null; } diff --git a/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php b/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php index deef2af69b..dbc934b394 100644 --- a/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php +++ b/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php @@ -86,7 +86,7 @@ class AutocompleteRequest extends FormRequest $valid = array_keys($this->types); return [ - 'date' => 'nullable|date|after:1900-01-01|before:2100-01-01', + 'date' => 'nullable|date|after:1970-01-02|before:2038-01-17', 'query' => 'nullable|string', 'size' => 'nullable|integer|min:1|max:100', 'page' => 'nullable|integer|min:1', diff --git a/app/Api/V2/Request/Chart/BalanceChartRequest.php b/app/Api/V2/Request/Chart/BalanceChartRequest.php index 3220714cdb..46c80d5f46 100644 --- a/app/Api/V2/Request/Chart/BalanceChartRequest.php +++ b/app/Api/V2/Request/Chart/BalanceChartRequest.php @@ -60,8 +60,8 @@ class BalanceChartRequest extends FormRequest public function rules(): array { return [ - 'start' => 'required|date|after:1900-01-01|before:2099-12-31', - 'end' => 'required|date|after_or_equal:start|before:2099-12-31|after:1900-01-01', + 'start' => 'required|date|after:1970-01-02|before:2038-01-17', + 'end' => 'required|date|after_or_equal:start|before:2038-01-17|after:1970-01-02', 'accounts.*' => 'required|exists:accounts,id', 'period' => sprintf('required|in:%s', implode(',', config('firefly.valid_view_ranges'))), ]; diff --git a/app/Api/V2/Request/Chart/ChartRequest.php b/app/Api/V2/Request/Chart/ChartRequest.php index cecb7edc40..d719129c6f 100644 --- a/app/Api/V2/Request/Chart/ChartRequest.php +++ b/app/Api/V2/Request/Chart/ChartRequest.php @@ -61,8 +61,8 @@ class ChartRequest extends FormRequest public function rules(): array { return [ - 'start' => 'required|date|after:1900-01-01|before:2099-12-31|before_or_equal:end', - 'end' => 'required|date|after:1900-01-01|before:2099-12-31|after_or_equal:start', + 'start' => 'required|date|after:1970-01-02|before:2038-01-17|before_or_equal:end', + 'end' => 'required|date|after:1970-01-02|before:2038-01-17|after_or_equal:start', 'preselected' => sprintf('nullable|in:%s', implode(',', config('firefly.preselected_accounts'))), 'period' => sprintf('nullable|in:%s', implode(',', config('firefly.valid_view_ranges'))), 'accounts.*' => 'exists:accounts,id', diff --git a/app/Api/V2/Request/Chart/DashboardChartRequest.php b/app/Api/V2/Request/Chart/DashboardChartRequest.php index 6c4a3cdfa6..08f1845ff1 100644 --- a/app/Api/V2/Request/Chart/DashboardChartRequest.php +++ b/app/Api/V2/Request/Chart/DashboardChartRequest.php @@ -60,8 +60,8 @@ class DashboardChartRequest extends FormRequest public function rules(): array { return [ - 'start' => 'required|date|after:1900-01-01|before:2099-12-31', - 'end' => 'required|date|after_or_equal:start|before:2099-12-31|after:1900-01-01', + 'start' => 'required|date|after:1970-01-02|before:2038-01-17', + 'end' => 'required|date|after_or_equal:start|before:2038-01-17|after:1970-01-02', 'preselected' => sprintf('in:%s', implode(',', config('firefly.preselected_accounts'))), 'accounts.*' => 'exists:accounts,id', ]; diff --git a/app/Api/V2/Request/Generic/DateRequest.php b/app/Api/V2/Request/Generic/DateRequest.php index 810d38e5b9..54ee20d068 100644 --- a/app/Api/V2/Request/Generic/DateRequest.php +++ b/app/Api/V2/Request/Generic/DateRequest.php @@ -55,8 +55,8 @@ class DateRequest extends FormRequest public function rules(): array { return [ - 'start' => 'required|date|after:1900-01-01|before:2099-12-31', - 'end' => 'required|date|after_or_equal:start|before:2099-12-31|after:1900-01-01', + 'start' => 'required|date|after:1970-01-02|before:2038-01-17', + 'end' => 'required|date|after_or_equal:start|before:2038-01-17|after:1970-01-02', ]; } } diff --git a/app/Api/V2/Request/Generic/SingleDateRequest.php b/app/Api/V2/Request/Generic/SingleDateRequest.php index a9a3465b44..12bd373c80 100644 --- a/app/Api/V2/Request/Generic/SingleDateRequest.php +++ b/app/Api/V2/Request/Generic/SingleDateRequest.php @@ -53,7 +53,7 @@ class SingleDateRequest extends FormRequest public function rules(): array { return [ - 'date' => 'required|date|after:1900-01-01|before:2099-12-31', + 'date' => 'required|date|after:1970-01-02|before:2038-01-17', ]; } } diff --git a/app/Api/V2/Request/Model/Account/IndexRequest.php b/app/Api/V2/Request/Model/Account/IndexRequest.php index 892ee4a16f..64a748175c 100644 --- a/app/Api/V2/Request/Model/Account/IndexRequest.php +++ b/app/Api/V2/Request/Model/Account/IndexRequest.php @@ -63,9 +63,9 @@ class IndexRequest extends FormRequest public function rules(): array { return [ - 'date' => 'date|after:1900-01-01|before:2099-12-31', - 'start' => 'date|after:1900-01-01|before:2099-12-31|before:end|required_with:end', - 'end' => 'date|after:1900-01-01|before:2099-12-31|after:start|required_with:start', + 'date' => 'date|after:1970-01-02|before:2038-01-17', + 'start' => 'date|after:1970-01-02|before:2038-01-17|before:end|required_with:end', + 'end' => 'date|after:1970-01-02|before:2038-01-17|after:start|required_with:start', ]; } } diff --git a/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php b/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php index a66e960f82..e54a4d836d 100644 --- a/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php +++ b/app/Api/V2/Request/Model/Transaction/InfiniteListRequest.php @@ -109,8 +109,8 @@ class InfiniteListRequest extends FormRequest public function rules(): array { return [ - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after:start|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after:start|after:1970-01-02|before:2038-01-17', 'start_row' => 'integer|min:0|max:4294967296', 'end_row' => 'integer|min:0|max:4294967296|gt:start_row', ]; diff --git a/app/Api/V2/Request/Model/Transaction/ListRequest.php b/app/Api/V2/Request/Model/Transaction/ListRequest.php index 17cf22b78a..70d4ae70c2 100644 --- a/app/Api/V2/Request/Model/Transaction/ListRequest.php +++ b/app/Api/V2/Request/Model/Transaction/ListRequest.php @@ -84,8 +84,8 @@ class ListRequest extends FormRequest public function rules(): array { return [ - 'start' => 'date|after:1900-01-01|before:2099-12-31', - 'end' => 'date|after:start|after:1900-01-01|before:2099-12-31', + 'start' => 'date|after:1970-01-02|before:2038-01-17', + 'end' => 'date|after:start|after:1970-01-02|before:2038-01-17', ]; } } diff --git a/app/Http/Requests/SelectTransactionsRequest.php b/app/Http/Requests/SelectTransactionsRequest.php index 674d3d222e..0cbdba1784 100644 --- a/app/Http/Requests/SelectTransactionsRequest.php +++ b/app/Http/Requests/SelectTransactionsRequest.php @@ -41,8 +41,8 @@ class SelectTransactionsRequest extends FormRequest public function rules(): array { return [ - 'start' => 'required|date|after:1900-01-01|before:2099-12-31|before:end|required_with:end', - 'end' => 'required|date|after:1900-01-01|before:2099-12-31|after:start|required_with:start', + 'start' => 'required|date|after:1970-01-02|before:2038-01-17|before:end|required_with:end', + 'end' => 'required|date|after:1970-01-02|before:2038-01-17|after:start|required_with:start', 'accounts' => 'required', 'accounts.*' => 'required|exists:accounts,id|belongsToUser:accounts', ]; diff --git a/app/Http/Requests/TagFormRequest.php b/app/Http/Requests/TagFormRequest.php index 8686b2bd5d..069ffd5ef3 100644 --- a/app/Http/Requests/TagFormRequest.php +++ b/app/Http/Requests/TagFormRequest.php @@ -74,7 +74,7 @@ class TagFormRequest extends FormRequest 'tag' => $tagRule, 'id' => $idRule, 'description' => 'max:32768|min:1|nullable', - 'date' => 'date|nullable|after:1984-09-17', + 'date' => 'date|nullable|after:1970-01-02|before:2038-01-17', ]; return Location::requestRules($rules);