formio / formio.js

JavaScript powered Forms with JSON Form Builder

Home Page:https://formio.github.io/formio.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate Id if multiple error messages

tkalmar opened this issue · comments

Describe the bug
When rendering a field with multiple error messages, the message div's get all the same Ids. This somewhat contradicts the idea of an id.

Version/Branch
4.19.1

To Reproduce
Steps to reproduce the behavior:
Use the kitchen-sink example:
https://formio.github.io/formio.js/app/examples/kitchen.html

in the day field enter 45 for the day of month.

Inspect the IDs of the error messages:

<div class="form-text error" id="e-exyimwc-day">Day is required</div>
<div class="form-text error" id="e-exyimwc-day">Day is not a valid day.</div>

Expected behavior
No duplicate IDs

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
https://github.com/formio/formio.js/blob/4.19.x/src/templates/bootstrap/message/form.ejs the cause lies within this template i think, which does not account for multiple IDs

@tkalmar Thank you for reporting this issue. I can reproduce it and have logged a ticket for the backlog. We are always willing to review any contributions to resolve this issue from the open-source community.

For internal reference: FIO-8256