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.
It's quite common to see error's like this coming from the module:
The value in This field has to be greater than x
"This field" starts with an uppercase even though it's in the middle of a sentence.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2902818-7.patch | 9.22 KB | nikunjkotecha |
| |||
#2 | grammatical_error_in-2902818-2.patch | 2.45 KB | Leon Kessler |
Comments
Comment #2
Leon Kessler CreditAttribution: Leon Kessler commentedComment #4
Leon Kessler CreditAttribution: Leon Kessler commentedSwitching back to needs review as issue in test is something unrelated.
Comment #5
nikunjkotechaNot really good with grammar but looks like we are trying to change the field's label value here in code.
Also, current code is consistent with 7.x
http://cgit.drupalcode.org/clientside_validation/tree/plugins/validator/...
I feel we should aim at allowing these messages to be configurable. What do you say @Leon / @Jelle_S / @attiks?
Comment #6
hocu CreditAttribution: hocu commentedAn option could be surrounding them with quotes.
@nikunjkotecha I think messages definitely need to be configurable. Those are very generic. Configuring them for some specific use case would help the site builders a lot.
Comment #7
nikunjkotechaUpdated all the plugins to allow overriding the message. Need Tests to be updated for same.
Comment #8
nikunjkotechaComment #9
nikunjkotecha@hocu I assume this patch fixes your issue https://www.drupal.org/project/clientside_validation/issues/3048775
Would love to hear your feedback (or at-least one feedback) on this before I merge it and release new version
Comment #10
nikunjkotechaComment #11
hocu CreditAttribution: hocu commented@nikunjkotecha I'm testing it and I'll inform you about the results. I was planning to write a quick patch for the other issue but your solution seems to be more thorough. Thanks.
Comment #12
hocu CreditAttribution: hocu commentedI've tested this and I can confirm that it's working. This also helped me override the messages via another module. So issue #3048775 is also solved.
Comment #13
nikunjkotechathanks, I'll merge now and release as IMO this is major milestone, about tests I'll be reworking them anyways to get it work with D9, I'll keep this ticket open to remind me about that.
Comment #15
nikunjkotechahttps://www.drupal.org/project/clientside_validation/releases/8.x-1.1
Comment #16
nikunjkotecha