Skip to content

Commit

Permalink
Include QualifiedMinCountConstraintComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminaaron committed Apr 30, 2024
1 parent 4ef5410 commit 4361e56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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 ?? "",
Expand Down

0 comments on commit 4361e56

Please sign in to comment.