From d7f81a64f8f73d0ea3e85a2779d733b009c63fd8 Mon Sep 17 00:00:00 2001 From: Sebastiaan Dammann Date: Thu, 1 Feb 2018 18:50:31 +0100 Subject: [PATCH] Found workaround for Microsoft/TypeScript/issues/21517 until it is fixed --- src/App/js/AppFramework/Forms/ValidationMessage.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App/js/AppFramework/Forms/ValidationMessage.ts b/src/App/js/AppFramework/Forms/ValidationMessage.ts index 1364334b..3cf950d7 100644 --- a/src/App/js/AppFramework/Forms/ValidationMessage.ts +++ b/src/App/js/AppFramework/Forms/ValidationMessage.ts @@ -71,10 +71,11 @@ ko.bindingHandlers.validationProperty = { element.setAttribute('required', 'required'); } } else { + const workaround = element as HTMLInputElement; if (validationState) { - element.classList.add('is-invalid'); + workaround.classList.add('is-invalid'); } else { - element.classList.remove('is-invalid'); + workaround.classList.remove('is-invalid'); } } }