29 lines
969 B
PHP
29 lines
969 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Finance;
|
|
|
|
use App\Http\Requests\ApiFormRequest;
|
|
|
|
class FeeTuitionBreakdownRequest extends ApiFormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user() !== null;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'students' => ['required', 'array', 'min:1'],
|
|
'students.*.student_id' => ['nullable', 'integer', 'min:1'],
|
|
'students.*.firstname' => ['nullable', 'string', 'max:100'],
|
|
'students.*.lastname' => ['nullable', 'string', 'max:100'],
|
|
'students.*.class_section_id' => ['nullable', 'integer', 'min:1'],
|
|
'students.*.grade' => ['nullable', 'string', 'max:20'],
|
|
'students.*.enrollment_status' => ['nullable', 'string', 'max:50'],
|
|
'students.*.admission_status' => ['nullable', 'string', 'max:50'],
|
|
'students.*.discount_amount' => ['nullable', 'numeric', 'min:0'],
|
|
];
|
|
}
|
|
}
|