fix: 🩹 add numeric validation for phone and postal_code in ListenFormRequest
This commit is contained in:
parent
d70dbce0f6
commit
19e2fc4f6a
1 changed files with 4 additions and 4 deletions
|
|
@ -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)],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue