Allow valdation of string values in openchoice (#81)
This commit is contained in:
parent
840c45c2da
commit
c6cbf7d7a6
|
@ -3608,7 +3608,8 @@ private boolean isAnswerRequirementFulfilled(QuestionnaireItemComponent qItem, L
|
|||
// If it's the wrong type, just keep going
|
||||
}
|
||||
}
|
||||
if (list.isEmpty() && !openChoice) {
|
||||
if (!openChoice) {
|
||||
if (list.isEmpty()) {
|
||||
rule(errors, IssueType.STRUCTURE, v.line(), v.col(), stack.getLiteralPath(), false, "Option list has no option values of type string");
|
||||
} else {
|
||||
boolean found = false;
|
||||
|
@ -3619,7 +3620,8 @@ private boolean isAnswerRequirementFulfilled(QuestionnaireItemComponent qItem, L
|
|||
}
|
||||
}
|
||||
if (!found) {
|
||||
rule(errors, IssueType.STRUCTURE, v.line(), v.col(), stack.getLiteralPath(), found, "The string "+v.primitiveValue()+" is not a valid option");
|
||||
rule(errors, IssueType.STRUCTURE, v.line(), v.col(), stack.getLiteralPath(), found, "The string " + v.primitiveValue() + " is not a valid option");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue