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

@@ -15,12 +15,37 @@ class CreateAppointmentRequest extends FormRequest
'team_member_id' => 'required|integer',
'full_name' => 'required|string|max:150',
'email' => 'required|email',
'contact_no' => 'required|string',
'contact_no' => ['required','nullable','regex:/^\+?\d{7,15}$/'],
'subject' => 'required|string|max:500',
'feedback' => 'required|string',
];
}
public function messages()
{
return [
'team_member_id.required' => 'The team member field is required.',
'team_member_id.integer' => 'The team member must be an integer.',
'full_name.required' => 'The full name field is required.',
'full_name.string' => 'The full name must be a string.',
'full_name.max' => 'The full name may not be greater than 150 characters.',
'email.required' => 'The email field is required.',
'email.email' => 'Invalid email format.',
'contact_no.required' => 'The contact number field is required.',
'contact_no.regex' => 'The contact number must be a valid phone number',
'subject.required' => 'The subject field is required.',
'subject.string' => 'The subject must be a string.',
'subject.max' => 'The subject may not be greater than 500 characters.',
'feedback.required' => 'The feedback field is required.',
'feedback.string' => 'The feedback must be a string.',
];
}
/**
* Determine if the user is authorized to make this request.
*/