When a validation error occurs in a datetime field, then the machine name of the field is used in the error messages, or the field name is omitted altogether. We should use the human readable name of the field to make it possible for a user to identify the field that has the error.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | screencapture-wg-test-node-add-page-2022-10-21-16_54_28.png | 125.89 KB | jaime@gingerrobot.com |
| #20 | 2876047-18 patch .png | 3.17 MB | pooja saraah |
| #18 | 2876047-18.patch | 907 bytes | hayashi |
Comments
Comment #2
pfrenssenComment #3
pfrenssenComment #4
mpdonadioI am 100% on board with this change. I think the biggest reason this slipped through the cracks is b/c some browsers (like Chrome) will enforce required fields, so a decent user set won't see these validation messages.
I'll mention this here, too. Think we can move this to a method on DateElementBase so we can share it between the Datetime and Datelist elements.
Comment #7
pfrenssenPostponing this on #2486019: Wrong validation messages in Datelist::validateDatelist() which will introduce the helper method on
DateElementBasethat is proposed in #4.Comment #8
mpdonadioComment #18
hayashi commentedThis problem still occurs.
I have created a patch that also uses helper functions in `Datetime` element.
Comment #19
andregp commentedComment #20
pooja saraah commentedApplied patch #18 in 9.4 successfully. Adding screenshots for reference
Comment #21
libbna commentedNot able to reproduce this issue. Can anyone write the steps, how to reproduce this issue? Thank you.
Comment #24
jaime@gingerrobot.com commentedHi, While the initial ticket was correct that this is still a bug in 9.4 (which I can re-create in 9.4.8) I can not reproduce this issue in Drupal 10 dev version.