28 lines
921 B
PHP
28 lines
921 B
PHP
<?php
|
|
|
|
namespace Modules\Investment\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UploadSalaryDeductionBatchRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'month' => ['required', 'integer', 'min:1', 'max:12'],
|
|
'year' => ['required', 'integer', 'min:2000', 'max:2100'],
|
|
'details' => ['required', 'array', 'min:1'],
|
|
'details.*.user_id' => ['required', 'uuid', 'exists:users,id'],
|
|
'details.*.investment_type_id' => ['required', 'uuid', 'exists:investment_types,id'],
|
|
'details.*.amount' => ['required', 'numeric', 'gt:0'],
|
|
'details.*.salary_contribution_id' => ['nullable', 'uuid', 'exists:salary_contributions,id'],
|
|
'details.*.remarks' => ['nullable', 'string', 'max:1000'],
|
|
];
|
|
}
|
|
}
|