fix: 급여 수당/공제 상세 벨리데이션 규칙 수정 (array → numeric)

- StoreSalaryRequest, UpdateSalaryRequest의 allowance_details.*, deduction_details.* 벨리데이션을 array에서 numeric으로 변경
- 수당/공제 항목은 {항목명: 금액} 구조이므로 값은 숫자가 올바름

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-02-19 17:34:57 +09:00
parent f1dc2d8bbe
commit 6f456f2cfd
2 changed files with 4 additions and 4 deletions

View File

@@ -23,9 +23,9 @@ public function rules(): array
'total_bonus' => ['nullable', 'numeric', 'min:0'], 'total_bonus' => ['nullable', 'numeric', 'min:0'],
'total_deduction' => ['nullable', 'numeric', 'min:0'], 'total_deduction' => ['nullable', 'numeric', 'min:0'],
'allowance_details' => ['nullable', 'array'], 'allowance_details' => ['nullable', 'array'],
'allowance_details.*' => ['nullable', 'array'], 'allowance_details.*' => ['nullable', 'numeric'], // 수당 항목별 금액 (key: 항목명, value: 금액)
'deduction_details' => ['nullable', 'array'], 'deduction_details' => ['nullable', 'array'],
'deduction_details.*' => ['nullable', 'array'], 'deduction_details.*' => ['nullable', 'numeric'], // 공제 항목별 금액 (key: 항목명, value: 금액)
'payment_date' => ['nullable', 'date'], 'payment_date' => ['nullable', 'date'],
'status' => ['nullable', 'string', 'in:scheduled,completed'], 'status' => ['nullable', 'string', 'in:scheduled,completed'],
]; ];

View File

@@ -23,9 +23,9 @@ public function rules(): array
'total_bonus' => ['nullable', 'numeric', 'min:0'], 'total_bonus' => ['nullable', 'numeric', 'min:0'],
'total_deduction' => ['nullable', 'numeric', 'min:0'], 'total_deduction' => ['nullable', 'numeric', 'min:0'],
'allowance_details' => ['nullable', 'array'], 'allowance_details' => ['nullable', 'array'],
'allowance_details.*' => ['nullable', 'array'], 'allowance_details.*' => ['nullable', 'numeric'],
'deduction_details' => ['nullable', 'array'], 'deduction_details' => ['nullable', 'array'],
'deduction_details.*' => ['nullable', 'array'], 'deduction_details.*' => ['nullable', 'numeric'],
'payment_date' => ['nullable', 'date'], 'payment_date' => ['nullable', 'date'],
'status' => ['nullable', 'string', 'in:scheduled,completed'], 'status' => ['nullable', 'string', 'in:scheduled,completed'],
]; ];