Catch amounts.

This commit is contained in:
James Cole
2023-12-31 17:29:00 +01:00
parent 51ca8277bb
commit e318e8e9cf
4 changed files with 8 additions and 8 deletions

View File

@@ -69,8 +69,8 @@ class UpdateRequest extends FormRequest
return [
'name' => 'between:1,255|uniquePiggyBankForUser:'.$piggyBank->id,
'current_amount' => ['numeric', 'gte:0', new LessThanPiggyTarget()],
'target_amount' => 'numeric|gte:0',
'current_amount' => ['numeric', 'gte:0', new LessThanPiggyTarget(),'max:1000000000'],
'target_amount' => 'numeric|gte:0|max:1000000000',
'start_date' => 'date|nullable',
'target_date' => 'date|nullable|after:start_date',
'notes' => 'max:65000',