From 4361e5674050b4bb9d7ee87c8eff1e36c5bcdf34 Mon Sep 17 00:00:00 2001 From: Benjamin Degenhart Date: Tue, 30 Apr 2024 20:59:46 +0200 Subject: [PATCH] Include QualifiedMinCountConstraintComponent --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index ef6e4d7..87808d3 100644 --- a/src/index.js +++ b/src/index.js @@ -97,7 +97,7 @@ export async function validateOne(userProfile, requirementProfile, datafieldsStr let missingList = [] for (let result of firstReport.results) { const comp = result.constraintComponent.value.split("#")[1] - if (comp === "MinCountConstraintComponent") { + if (comp === "MinCountConstraintComponent" || comp === "QualifiedMinCountConstraintComponent") { let missingPredicate = result.path[0].predicates[0].id // can these two arrays be bigger than 1? let fromSubject = result.focusNode.value let message = result.message[0].value // can the arrays be bigger than 1? @@ -267,7 +267,7 @@ function collectViolations(report, skipMinCountAndNode) { let violations = [] for (let result of report.results) { const comp = result.constraintComponent.value.split("#")[1] - if (skipMinCountAndNode && (comp === "MinCountConstraintComponent" || comp === "NodeConstraintComponent")) continue + if (skipMinCountAndNode && (comp === "MinCountConstraintComponent" || comp === "QualifiedMinCountConstraintComponent" || comp === "NodeConstraintComponent")) continue violations.push({ constraint: result.constraintComponent.value, focusNode: result.focusNode?.value ?? "",