From 16b9d3a7b307a85a1c8c384668e08e4f7bab8a95 Mon Sep 17 00:00:00 2001 From: Lukas Halbritter Date: Tue, 16 Oct 2018 09:35:00 +0200 Subject: [PATCH] Fixed validation rule to check the date of a new person target in the booking create form. --- app/Http/Requests/StoreBooking.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Requests/StoreBooking.php b/app/Http/Requests/StoreBooking.php index 6e51baf..8db61f3 100644 --- a/app/Http/Requests/StoreBooking.php +++ b/app/Http/Requests/StoreBooking.php @@ -34,6 +34,7 @@ class StoreBooking extends FormRequest 'personTarget.person_id' => 'empty_if:person_target_id' . '|required_with:personTarget.date', 'personTarget.date' => 'sometimes' + . '|nullable' . '|empty_if:person_target_id' . '|before_or_equal:date' ];