physiotherapy-clinic/app/Http/Requests/StorePatientRequest.php

36 lines
1.2 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StorePatientRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'first_name' => ['required', 'string', 'max:255'],
'last_name' => ['required', 'string', 'max:255'],
'email' => ['nullable', 'email', 'max:255', 'unique:patients'],
'phone' => ['nullable', 'string', 'max:50'],
'whatsapp' => ['nullable', 'string', 'max:50'],
'national_id' => ['nullable', 'string', 'max:50'],
'date_of_birth' => ['nullable', 'date'],
'gender' => ['nullable', 'in:male,female,other'],
'address' => ['nullable', 'string'],
'referral_source' => ['nullable', 'string', 'max:255'],
'emergency_contact_name' => ['nullable', 'string', 'max:255'],
'emergency_contact_phone' => ['nullable', 'string', 'max:50'],
'medical_history' => ['nullable', 'string'],
'allergies' => ['nullable', 'string'],
'notes' => ['nullable', 'string'],
'status' => ['nullable', 'in:active,inactive'],
];
}
}