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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Leon Kessler created an issue. See original summary.

Leon Kessler’s picture

Status: Active » Needs review
FileSize
2.45 KB

Status: Needs review » Needs work

The last submitted patch, 2: grammatical_error_in-2902818-2.patch, failed testing. View results

Leon Kessler’s picture

Status: Needs work » Needs review

Switching back to needs review as issue in test is something unrelated.

nikunjkotecha’s picture

Status: Needs review » Postponed (maintainer needs more info)

Not 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?

hocu’s picture

An 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.

nikunjkotecha’s picture

Issue tags: +Needs tests
FileSize
9.22 KB

Updated all the plugins to allow overriding the message. Need Tests to be updated for same.

nikunjkotecha’s picture

Status: Postponed (maintainer needs more info) » Needs review
nikunjkotecha’s picture

@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

nikunjkotecha’s picture

hocu’s picture

@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.

hocu’s picture

Status: Needs review » Reviewed & tested by the community

I'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.

nikunjkotecha’s picture

thanks, 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.

  • nikunjkotecha committed f27477a on 8.x-1.x
    Issue #2902818 by nikunjkotecha, Leon Kessler, hocu: Grammatical error...
nikunjkotecha’s picture

nikunjkotecha’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.