From 6f456f2cfde17c2d674cf9c8b4e6fe73afbb9883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=B3=91=EC=B2=A0?= Date: Thu, 19 Feb 2026 17:34:57 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B8=89=EC=97=AC=20=EC=88=98=EB=8B=B9/?= =?UTF-8?q?=EA=B3=B5=EC=A0=9C=20=EC=83=81=EC=84=B8=20=EB=B2=A8=EB=A6=AC?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=EC=85=98=20=EA=B7=9C=EC=B9=99=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(array=20=E2=86=92=20numeric)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - StoreSalaryRequest, UpdateSalaryRequest의 allowance_details.*, deduction_details.* 벨리데이션을 array에서 numeric으로 변경 - 수당/공제 항목은 {항목명: 금액} 구조이므로 값은 숫자가 올바름 Co-Authored-By: Claude Opus 4.6 --- app/Http/Requests/V1/Salary/StoreSalaryRequest.php | 4 ++-- app/Http/Requests/V1/Salary/UpdateSalaryRequest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Requests/V1/Salary/StoreSalaryRequest.php b/app/Http/Requests/V1/Salary/StoreSalaryRequest.php index b23f1d1..61c163b 100644 --- a/app/Http/Requests/V1/Salary/StoreSalaryRequest.php +++ b/app/Http/Requests/V1/Salary/StoreSalaryRequest.php @@ -23,9 +23,9 @@ public function rules(): array 'total_bonus' => ['nullable', 'numeric', 'min:0'], 'total_deduction' => ['nullable', 'numeric', 'min:0'], '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', 'numeric'], // 공제 항목별 금액 (key: 항목명, value: 금액) 'payment_date' => ['nullable', 'date'], 'status' => ['nullable', 'string', 'in:scheduled,completed'], ]; diff --git a/app/Http/Requests/V1/Salary/UpdateSalaryRequest.php b/app/Http/Requests/V1/Salary/UpdateSalaryRequest.php index 39c0fb4..3edb6ff 100644 --- a/app/Http/Requests/V1/Salary/UpdateSalaryRequest.php +++ b/app/Http/Requests/V1/Salary/UpdateSalaryRequest.php @@ -23,9 +23,9 @@ public function rules(): array 'total_bonus' => ['nullable', 'numeric', 'min:0'], 'total_deduction' => ['nullable', 'numeric', 'min:0'], 'allowance_details' => ['nullable', 'array'], - 'allowance_details.*' => ['nullable', 'array'], + 'allowance_details.*' => ['nullable', 'numeric'], 'deduction_details' => ['nullable', 'array'], - 'deduction_details.*' => ['nullable', 'array'], + 'deduction_details.*' => ['nullable', 'numeric'], 'payment_date' => ['nullable', 'date'], 'status' => ['nullable', 'string', 'in:scheduled,completed'], ];