More strict date validation

This commit is contained in:
James Cole
2025-01-25 04:49:28 +01:00
parent 0986bfbc34
commit 4f7cc7d53b
14 changed files with 26 additions and 26 deletions

View File

@@ -66,8 +66,8 @@ class Request extends FormRequest
'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
'amount' => ['nullable', new IsValidPositiveAmount()],
'start' => 'date',
'end' => 'date',
'start' => 'date|after:1900-01-01|before:2099-12-31',
'end' => 'date|after:1900-01-01|before:2099-12-31',
];
}