feat: ✨ make postcode required in contact form

This commit is contained in:
Noah Lancien 2026-07-02 11:31:23 +02:00
parent 634962d93e
commit c869ad71c0
2 changed files with 4 additions and 4 deletions

View file

@ -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)],

View file

@ -77,7 +77,7 @@
</div>
<div class="col-12 col-sm-6 d-flex justify-content-center justify-content-sm-start flex-wrap">
<input class="form-control black-square mb-3 p-3" id="postcode" name="postcode" type="text"
value="{{ $val('postcode') }}" placeholder="{{ __('Code postal') }}">
value="{{ $val('postcode') }}" placeholder="{{ __('Code postal *') }}" required>
@include('fo.modules.input-error', ['inputName' => 'postcode'])
</div>
<div class="col-12 col-sm-6 d-flex justify-content-center justify-content-sm-start flex-wrap">
@ -210,6 +210,6 @@
window.WebCookieNotice.acceptCookie('recaptcha');
});
});
</script>
@endpush
@endpush