Reverted to original version
This commit is contained in:
parent
b7843498dc
commit
a981452957
|
@ -56,17 +56,6 @@ public class QuestionnaireResponseValidator extends BaseValidator {
|
||||||
|
|
||||||
private IWorkerContext myWorkerCtx;
|
private IWorkerContext myWorkerCtx;
|
||||||
|
|
||||||
// this is here not to introduce enabledWhen validation unless wanted
|
|
||||||
private boolean skipEnabledCheck = true;
|
|
||||||
|
|
||||||
public boolean isSkipEnabledCheck() {
|
|
||||||
return skipEnabledCheck;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSkipEnabledCheck(boolean skipEnabledCheck) {
|
|
||||||
this.skipEnabledCheck = skipEnabledCheck;
|
|
||||||
}
|
|
||||||
|
|
||||||
public QuestionnaireResponseValidator(IWorkerContext theWorkerCtx) {
|
public QuestionnaireResponseValidator(IWorkerContext theWorkerCtx) {
|
||||||
this.myWorkerCtx = theWorkerCtx;
|
this.myWorkerCtx = theWorkerCtx;
|
||||||
}
|
}
|
||||||
|
@ -227,14 +216,12 @@ public class QuestionnaireResponseValidator extends BaseValidator {
|
||||||
List<QuestionnaireResponseItemComponent> responseItems = findResponsesByLinkId(theResponseItems, linkId);
|
List<QuestionnaireResponseItemComponent> responseItems = findResponsesByLinkId(theResponseItems, linkId);
|
||||||
if (responseItems.isEmpty()) {
|
if (responseItems.isEmpty()) {
|
||||||
if (nextQuestionnaireItem.getRequired()) {
|
if (nextQuestionnaireItem.getRequired()) {
|
||||||
if ((skipEnabledCheck /*|| myEnableWhenEvaluator.isQuestionEnabled(nextQuestionnaireItem, theResponseItems)*/) && nextQuestionnaireItem.getRequired() ) {
|
|
||||||
if (theValidateRequired) {
|
if (theValidateRequired) {
|
||||||
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
|
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
|
||||||
} else {
|
} else {
|
||||||
hint(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
|
hint(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (responseItems.size() > 1) {
|
if (responseItems.size() > 1) {
|
||||||
|
|
Loading…
Reference in New Issue