Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
DateElementBase
that is proposed in #4.Comment #8
mpdonadioComment #18
hayashi CreditAttribution: hayashi commentedThis problem still occurs.
I have created a patch that also uses helper functions in `Datetime` element.
Comment #19
andregp CreditAttribution: andregp at CI&T commentedComment #20
pooja saraah CreditAttribution: pooja saraah at Srijan | A Material+ Company for Drupal India Association commentedApplied patch #18 in 9.4 successfully. Adding screenshots for reference
Comment #21
Libbna CreditAttribution: Libbna as a volunteer and at QED42 for Drupal India Association commentedNot able to reproduce this issue. Can anyone write the steps, how to reproduce this issue? Thank you.
Comment #24
jaime@gingerrobot.com CreditAttribution: jaime@gingerrobot.com at Ginger Robot 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.