This commit is contained in:
James Cole 2018-09-09 07:48:17 +02:00
parent d5679c372f
commit d2c1e30979
2 changed files with 6 additions and 2 deletions

View File

@ -50,14 +50,17 @@ class PiggyBankRequest extends Request
*/
public function getAll(): array
{
$current = $this->string('current_amount');
$current = '' === $current ? '0' : $current;
return [
'name' => $this->string('name'),
'account_id' => $this->integer('account_id'),
'targetamount' => $this->string('target_amount'),
'current_amount' => $this->string('current_amount'),
'current_amount' => $current,
'start_date' => $this->date('start_date'),
'target_date' => $this->date('target_date'),
'notes' => $this->string('notes'),
'notes' => $this->string('notes'),
];
}

View File

@ -87,6 +87,7 @@ return [
'max.array' => 'The :attribute may not have more than :max items.',
'mimes' => 'The :attribute must be a file of type: :values.',
'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.string' => 'The :attribute must be at least :min characters.',
'min.array' => 'The :attribute must have at least :min items.',