Piggies can have no target amount.

This commit is contained in:
James Cole
2022-03-27 18:30:46 +02:00
parent 980120f1bd
commit 8ee4c2ea11
9 changed files with 94 additions and 59 deletions

View File

@@ -65,7 +65,7 @@ class PiggyBankUpdateRequest extends FormRequest
return [
'name' => sprintf('required|between:1,255|uniquePiggyBankForUser:%d', $piggy->id),
'account_id' => 'required|belongsToUser:accounts',
'targetamount' => 'required|numeric|gte:0.01|max:1000000000',
'targetamount' => 'nullable|numeric|max:1000000000',
'startdate' => 'date',
'targetdate' => 'date|nullable',
'order' => 'integer|min:1',