From 9ce1c535e0ebfa1d81f3a67df5c9eb70f289122f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kry=C5=A1p=C3=ADn?= Date: Mon, 17 Jul 2023 11:20:06 +0200 Subject: [PATCH] BREAKING CHANGE(form-validation): Add `spirit` infix to `data-element` in Validation Text #DS-585 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename attribute `data-element` to `data-spirit-element` of Validation Text element. ## Migration Guide Add `spirit` infix to your styles and other integrations - `.Component > [data-element="validation_text"] {}` → `.Component > [data-spirit-element="validation_text"] {}` If you use Spirit components, then you don't need to do anything, internal styles are already updated. Please refer back to this guide or reach out to our team if you encounter any issues during migration. --- packages/form-validations/src/FormValidations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/form-validations/src/FormValidations.ts b/packages/form-validations/src/FormValidations.ts index 8062351fce..320ee14591 100644 --- a/packages/form-validations/src/FormValidations.ts +++ b/packages/form-validations/src/FormValidations.ts @@ -416,7 +416,7 @@ class FormValidations { field.input.type === 'checkbox' ? 'span' : this.config.validationTextTag, ) as ValidationTextElement; validationTextElement.className = `${VALIDATIONS_ERROR} ${this.config.validationTextClass}`; - validationTextElement.dataset.element = this.config.dataElementMessage; + validationTextElement.dataset.spiritElement = this.config.dataElementMessage; validationTextParent.appendChild(validationTextElement); validationTextElement.formValidationsDisplay = validationTextElement.style.display; }