adopted-ember-addons / adopted-ember-addons/ember-changeset-validations

Feature Request: Public API for getDescriptionFor

Open
#136 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
215
Forks
98
PR merge metrics
No merged PRs in 30d

Description

In my app, the propertyName for the input does not always map to the displayed label; this would be even more common in localised products.

For example:

```
{{spanishProperty}}

{{#if (get changeset.error property)}}


    {{#each (get (get changeset.error property) "validation") as |message|}}
  • {{message}}

  • {{/each}}


{{/if}}
```

While it is possible to change the messages hash per language, the hardcoded `{description}` just takes the propertyName and normalises it.

Would it be possible to allow the `app/utils/messages.js` file to be overridden, in order to allow more complex names for the `{description}` placeholder?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.