first commit
Some checks failed
tests / ci (push) Has been cancelled

This commit is contained in:
2026-10-27 11:01:11 +00:00
parent 9b8b21c853
commit fb04d71a8d
29 changed files with 9733 additions and 326 deletions

View File

@@ -34,6 +34,13 @@ class StoreReservationRequest extends FormRequest
public function after(): array
{
return [function (Validator $validator): void {
$now = now();
$nowFormatted = $now->format('d/m/Y \à\s H:i');
if ($validator->errors()->has('starts_at')) {
$validator->errors()->add('starts_at', "A data de início deve ser posterior às {$nowFormatted}.");
}
if ($validator->errors()->hasAny(['starts_at', 'ends_at'])) {
return;
}