From ba5de578aefe98d6ef11149716828f711f87bce3 Mon Sep 17 00:00:00 2001 From: Yeser Amer Date: Sat, 16 Mar 2024 06:37:54 +0100 Subject: [PATCH] kie-issues#1014: KIE Sandbox: Enabling Validation for DMN Assets up to 1.5 (#2200) --- packages/online-editor/src/editor/Validation.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/online-editor/src/editor/Validation.tsx b/packages/online-editor/src/editor/Validation.tsx index 6e87387d04f..df88956446e 100644 --- a/packages/online-editor/src/editor/Validation.tsx +++ b/packages/online-editor/src/editor/Validation.tsx @@ -120,14 +120,22 @@ export function useFileValidation( const decodedFileContent = decoder.decode(fileContent); const dmnSpecVersion = dmnLanguageService?.getSpecVersion(decodedFileContent); - if (!dmnSpecVersion || (dmnSpecVersion !== "1.0" && dmnSpecVersion !== "1.1" && dmnSpecVersion !== "1.2")) { + if ( + !dmnSpecVersion || + (dmnSpecVersion !== "1.0" && + dmnSpecVersion !== "1.1" && + dmnSpecVersion !== "1.2" && + dmnSpecVersion !== "1.3" && + dmnSpecVersion !== "1.4" && + dmnSpecVersion !== "1.5") + ) { setNotifications(i18n.terms.validation, "", [ { type: "ALERT", normalizedPosixPathRelativeToTheWorkspaceRoot: "", severity: "WARNING", message: - "Validation checks are temporarily supported only on DMN 1.2 or below. For full access to this feature, use the Legacy DMN Editor.", + "Validation doesn't support this DMN version" + dmnSpecVersion ? "(" + dmnSpecVersion + ")" : "", }, ]); return;