diff --git a/packages/meta/src/validatordef/generator/templates/NonOptionalsCheckerTemplate.ts b/packages/meta/src/validatordef/generator/templates/NonOptionalsCheckerTemplate.ts index 02fec0c95..37033b6ce 100644 --- a/packages/meta/src/validatordef/generator/templates/NonOptionalsCheckerTemplate.ts +++ b/packages/meta/src/validatordef/generator/templates/NonOptionalsCheckerTemplate.ts @@ -84,7 +84,6 @@ export class NonOptionalsCheckerTemplate { } result += `if (modelelement.${prop.name} === null || modelelement.${prop.name} === undefined ${additionalStringCheck}) { - hasFatalError = true; this.errorList.push(new ${Names.FreError}("Property '${prop.name}' must have a value", modelelement, ${locationdescription}, '${prop.name}', ${Names.FreErrorSeverity}.Error)); } `; @@ -95,9 +94,8 @@ export class NonOptionalsCheckerTemplate { this.done.push(concept); return `${commentBefore} public execBefore${Names.classifier(concept)}(modelelement: ${Names.classifier(concept)}): boolean { - let hasFatalError: boolean = false; ${result} - return hasFatalError; + return false; }`; } else { return ``; diff --git a/packages/meta/src/validatordef/generator/templates/ReferenceCheckerTemplate.ts b/packages/meta/src/validatordef/generator/templates/ReferenceCheckerTemplate.ts index 8ba8baa03..f9334dc70 100644 --- a/packages/meta/src/validatordef/generator/templates/ReferenceCheckerTemplate.ts +++ b/packages/meta/src/validatordef/generator/templates/ReferenceCheckerTemplate.ts @@ -78,13 +78,11 @@ export class ReferenceCheckerTemplate { result += `for (const referredElem of modelelement.${prop.name} ) { if (referredElem.referred === null) { this.makeErrorMessage(modelelement, referredElem, "${prop.name}", \`\${${locationdescription}}\`); - hasFatalError = true; } }`; } else { result += `if (!!modelelement.${prop.name} && modelelement.${prop.name}.referred === null) { this.makeErrorMessage(modelelement, modelelement.${prop.name}, "${prop.name}", \`\${${locationdescription}}\`); - hasFatalError = true; }`; } } @@ -102,9 +100,8 @@ export class ReferenceCheckerTemplate { * @param modelelement */ public execBefore${Names.classifier(concept)}(modelelement: ${Names.classifier(concept)}): boolean { - let hasFatalError: boolean = false; ${result} - return hasFatalError; + return false; }`; } else { return ``;