fix : 컨트롤러 검증 → FormRequest 분리

This commit is contained in:
2025-09-08 02:28:14 +09:00
parent d9563c96cb
commit 4bf02b7424
9 changed files with 204 additions and 26 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Support\Validation;
class BomItemRules
{
public static function base(): array
{
return [
'ref_type' => 'required|string|in:MATERIAL,PRODUCT',
'ref_id' => 'required|integer|min:1',
'qty' => 'required|numeric|gt:0',
'waste_rate' => 'nullable|numeric|min:0',
'uom_id' => 'nullable|integer|min:1',
'notes' => 'nullable|string|max:255',
'sort_order' => 'nullable|integer',
'category_id'=> 'nullable|integer', // 선택: 카테고리 분류 사용 시
];
}
}