['sometimes', 'required', Rule::in(ProductStockQuality::values())], 'items' => ['required', 'array', 'min:1'], 'items.*.product_variant_id' => ['required', 'integer', 'exists:product_variants,id'], 'items.*.quantity' => ['required', 'integer', 'min:1'], 'notes' => ['nullable', 'string', 'max:100'], 'photo_key' => ['nullable', 'string', 'max:500'], ]; } public function attributes(): array { return [ 'stock_type' => 'Jenis Stok', 'items' => 'Item Produk', 'items.*.product_variant_id' => 'Varian Produk', 'items.*.quantity' => 'Jumlah', 'notes' => 'Keterangan', 'photo_key' => 'Foto', ]; } }