'sometimes|nullable|array', "$prefix.registration_value" => 'nullable|numeric|min:0', "$prefix.classes_value" => 'nullable|numeric|min:0', "$prefix.classes_discount_percentage" => 'nullable|numeric|min:0|max:100', "$prefix.materials" => 'nullable|array', "$prefix.materials.*.product_id" => "required_with:$prefix.materials|integer|exists:products,id", "$prefix.materials.*.quantity" => "required_with:$prefix.materials|integer|min:1", "$prefix.materials.*.price" => "required_with:$prefix.materials|numeric|min:0", "$prefix.total_value" => 'nullable|numeric|min:0', "$prefix.total_max_installments" => 'nullable|integer|min:1', ]; if ($withCondition) { $rules["$prefix.condition"] = 'nullable|string'; } return $rules; } /** * For each pricing block actually sent (present and not null), enforce * that exactly one of "included in course" / "allows installments" is * selected per section. */ protected function validateProposalPricingSections(Validator $validator, array $prefixes): void { // No longer needed, columns removed. Maintained to avoid breaking dependent code. } }