Skip to content

Commit

Permalink
BREAKING CHANGE(form-validation): Add spirit infix to `data-element…
Browse files Browse the repository at this point in the history
…` in Validation Text #DS-585

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.
  • Loading branch information
crishpeen committed Jul 17, 2023
1 parent 37fe950 commit 9ce1c53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/form-validations/src/FormValidations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9ce1c53

Please sign in to comment.