fix : 컨트롤러 검증 → FormRequest 분리
This commit is contained in:
19
app/Support/Validation/BomItemRules.php
Normal file
19
app/Support/Validation/BomItemRules.php
Normal 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', // 선택: 카테고리 분류 사용 시
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user