mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixes for #1670
This commit is contained in:
parent
d5679c372f
commit
d2c1e30979
@ -50,14 +50,17 @@ class PiggyBankRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function getAll(): array
|
public function getAll(): array
|
||||||
{
|
{
|
||||||
|
$current = $this->string('current_amount');
|
||||||
|
$current = '' === $current ? '0' : $current;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'name' => $this->string('name'),
|
'name' => $this->string('name'),
|
||||||
'account_id' => $this->integer('account_id'),
|
'account_id' => $this->integer('account_id'),
|
||||||
'targetamount' => $this->string('target_amount'),
|
'targetamount' => $this->string('target_amount'),
|
||||||
'current_amount' => $this->string('current_amount'),
|
'current_amount' => $current,
|
||||||
'start_date' => $this->date('start_date'),
|
'start_date' => $this->date('start_date'),
|
||||||
'target_date' => $this->date('target_date'),
|
'target_date' => $this->date('target_date'),
|
||||||
'notes' => $this->string('notes'),
|
'notes' => $this->string('notes'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ return [
|
|||||||
'max.array' => 'The :attribute may not have more than :max items.',
|
'max.array' => 'The :attribute may not have more than :max items.',
|
||||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||||
'min.numeric' => 'The :attribute must be at least :min.',
|
'min.numeric' => 'The :attribute must be at least :min.',
|
||||||
|
'lte.numeric' => 'The :attribute must be less than or equal :value.',
|
||||||
'min.file' => 'The :attribute must be at least :min kilobytes.',
|
'min.file' => 'The :attribute must be at least :min kilobytes.',
|
||||||
'min.string' => 'The :attribute must be at least :min characters.',
|
'min.string' => 'The :attribute must be at least :min characters.',
|
||||||
'min.array' => 'The :attribute must have at least :min items.',
|
'min.array' => 'The :attribute must have at least :min items.',
|
||||||
|
Loading…
Reference in New Issue
Block a user