mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 03:53:37 +00:00
Compare commits
7 Commits
develop-20
...
develop-20
Author | SHA1 | Date | |
---|---|---|---|
|
cbf7aef0c1 | ||
|
8c3e6c0189 | ||
|
cf7ee79c1c | ||
|
7e344e4332 | ||
|
0a55e9fb4e | ||
|
ed2e0e86dc | ||
|
9d1fb2cd6a |
@@ -30,8 +30,8 @@ class DateRangeRequest extends ApiRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'start' => sprintf('date|after:1970-01-02|before:2038-01-17|before:end|required_with:end|', $this->required),
|
||||
'end' => sprintf('date|after:1970-01-02|before:2038-01-17|after:start|required_with:start|', $this->required),
|
||||
'start' => sprintf('date|after:1970-01-02|before:2038-01-17|before:end|required_with:end|%s', $this->required),
|
||||
'end' => sprintf('date|after:1970-01-02|before:2038-01-17|after:start|required_with:start|%s', $this->required),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ class DateRangeRequest extends ApiRequest
|
||||
{
|
||||
$validator->after(
|
||||
function (Validator $validator): void {
|
||||
$this->attributes->set('start', null);
|
||||
$this->attributes->set('end', null);
|
||||
if (!$validator->valid()) {
|
||||
return;
|
||||
}
|
||||
|
@@ -38,6 +38,7 @@ class DateRequest extends ApiRequest
|
||||
{
|
||||
$validator->after(
|
||||
function (Validator $validator): void {
|
||||
$this->attributes->set('date', null);
|
||||
if (!$validator->valid()) {
|
||||
return;
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ class PaginationRequest extends ApiRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'sort' => ['nullable', new IsValidSortInstruction($this->sortClass)],
|
||||
'sort' => ['nullable', new IsValidSortInstruction((string)$this->sortClass)],
|
||||
'limit' => 'numeric|min:1|max:131337',
|
||||
'page' => 'numeric|min:1|max:131337',
|
||||
];
|
||||
|
@@ -38,6 +38,11 @@ class IsValidSortInstruction implements ValidationRule
|
||||
|
||||
return;
|
||||
}
|
||||
if ('' === $value) {
|
||||
// don't validate.
|
||||
|
||||
return;
|
||||
}
|
||||
$validParameters = config(sprintf('firefly.allowed_sort_parameters.%s', $shortClass));
|
||||
if (!is_array($validParameters)) {
|
||||
$fail('validation.no_sort_instructions')->translate(['object' => $shortClass]);
|
||||
|
@@ -78,8 +78,8 @@ return [
|
||||
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2025-10-10',
|
||||
'build_time' => 1760116211,
|
||||
'version' => 'develop/2025-10-11',
|
||||
'build_time' => 1760157052,
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 28, // field is no longer used.
|
||||
|
||||
|
Reference in New Issue
Block a user