From 19e2fc4f6a859ae09eb9c50a7bdbee78387c2940 Mon Sep 17 00:00:00 2001 From: Nicolas Demangeat Date: Tue, 22 Jul 2025 09:06:26 +0200 Subject: [PATCH] fix: :adhesive_bandage: add numeric validation for phone and postal_code in ListenFormRequest --- app/Http/Requests/Fo/ListenFormRequest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Requests/Fo/ListenFormRequest.php b/app/Http/Requests/Fo/ListenFormRequest.php index 2259814..fcf993f 100644 --- a/app/Http/Requests/Fo/ListenFormRequest.php +++ b/app/Http/Requests/Fo/ListenFormRequest.php @@ -46,8 +46,8 @@ class ListenFormRequest extends FormRequest !is_null(request()->input('country')) ? (Country::make(request()->input('country'))->value === Country::france->value ? 'phone:FR|max:25' : - 'max:50') : - 'max:50' + 'numeric|max:50') : + 'numeric|max:50' ], 'postal_code' => [ 'present', @@ -55,8 +55,8 @@ class ListenFormRequest extends FormRequest !is_null(request()->input('country')) ? (Country::make(request()->input('country'))->value === Country::france->value ? 'postal_code:FR|max:25' : - 'max:50') : - 'max:50' + 'numeric|max:50') : + 'numeric|max:50' ], 'city' => 'present|nullable|string|between:3,20', 'country' => ['present', 'nullable', new Enum(Country::class)],