Files
alrahma_sunday_school_api/app/Http/Requests/Students/StudentUpdateRequest.php
T
2026-03-26 16:04:03 -04:00

33 lines
1.2 KiB
PHP

<?php
namespace App\Http\Requests\Students;
use App\Http\Requests\ApiFormRequest;
class StudentUpdateRequest extends ApiFormRequest
{
public function rules(): array
{
return [
'school_id' => ['nullable', 'string', 'max:100'],
'firstname' => ['required', 'string', 'max:255'],
'lastname' => ['required', 'string', 'max:255'],
'dob' => ['required', 'date'],
'age' => ['nullable', 'integer'],
'gender' => ['required', 'in:Male,Female,Other'],
'registration_grade' => ['required', 'string', 'max:50'],
'photo_consent' => ['nullable', 'boolean'],
'parent_id' => ['required', 'integer', 'min:1'],
'registration_date' => ['nullable', 'date'],
'tuition_paid' => ['nullable', 'boolean'],
'year_of_registration' => ['nullable', 'string'],
'school_year' => ['nullable', 'string'],
'semester' => ['nullable', 'string'],
'is_new' => ['required', 'boolean'],
'is_active' => ['nullable', 'boolean'],
'medical_conditions' => ['nullable', 'string'],
'allergies' => ['nullable', 'string'],
];
}
}