From c869ad71c08ecc124a2557abb3ce81601a29b4f7 Mon Sep 17 00:00:00 2001 From: Noah Lancien Date: Thu, 2 Jul 2026 11:31:23 +0200 Subject: [PATCH] feat: :sparkles: make postcode required in contact form --- app/Http/Requests/Fo/Contact/ContactRequest.php | 2 +- resources/views/fo/pages/contact.blade.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Requests/Fo/Contact/ContactRequest.php b/app/Http/Requests/Fo/Contact/ContactRequest.php index 9bd2e96..1b5d85b 100644 --- a/app/Http/Requests/Fo/Contact/ContactRequest.php +++ b/app/Http/Requests/Fo/Contact/ContactRequest.php @@ -48,7 +48,7 @@ class ContactRequest extends FormRequest 'phone' => 'required|max:255|phone:' . implode(',', $this->isoCodes()), 'activity' => ['required', new Enum(ContactActivityEnum::class)], 'society' => 'nullable|string|max:255', - 'postcode' => 'nullable|postal_code:' . implode(',', $this->isoCodes()), + 'postcode' => 'required|postal_code:' . implode(',', $this->isoCodes()), 'city' => 'nullable|string|max:255', 'message' => 'required|string|min:20|max:255', 'callTime' => ['required', new Enum(ContactTimeEnum::class)], diff --git a/resources/views/fo/pages/contact.blade.php b/resources/views/fo/pages/contact.blade.php index 6711e29..642134d 100644 --- a/resources/views/fo/pages/contact.blade.php +++ b/resources/views/fo/pages/contact.blade.php @@ -77,7 +77,7 @@
+ value="{{ $val('postcode') }}" placeholder="{{ __('Code postal *') }}" required> @include('fo.modules.input-error', ['inputName' => 'postcode'])
@@ -210,6 +210,6 @@ window.WebCookieNotice.acceptCookie('recaptcha'); }); }); - + -@endpush \ No newline at end of file +@endpush