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

Feature Request: Public API for getDescriptionFor

Đang mở
#136 2 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
215
Fork
98
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.