This commit is contained in:
2025-08-21 16:04:24 +05:45
parent 76bf4c0a18
commit 0307244399
16 changed files with 443 additions and 23 deletions

View File

@@ -17,7 +17,7 @@ class CreateContactUsRequest extends FormRequest
'email' => 'sometimes|nullable|email',
'subject' => 'sometimes|nullable|string|max:1000',
'message' => 'required|string|max:1000',
'phone' => 'sometimes|nullable|numeric|digits:10',
'phone' => ['sometimes','nullable','regex:/^\+?\d{7,15}$/'],
];
}
@@ -42,7 +42,8 @@ class CreateContactUsRequest extends FormRequest
'message.max' => 'The message may not be greater than 1000 characters.',
'phone.numeric' => 'The phone must be a number.',
'phone.digits' => 'The phone must be exactly 10 digits long.'
'phone.digits_between' => 'The phone must be a number between 7 and 15 digits long.',
];
}