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

Changing validation error messages at runtime

Aperta
#94 34 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
215
Fork
98
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi, great addon.

I'm wondering, if there is a recommended way of changing validation messages at runtime?

I know it's possible to change it initially by defining a module that matches [`/validations\/messages$/gi`](https://github.com/DockYard/ember-changeset-validations/blob/master/addon/utils/get-messages.js#L7) but it's only loaded once.

``` js
define(['foo/validations/messages'], () => {
return {default: {
...messages
}};
})
```

If a user changes its locale, it's impossible to update validation messages from what i can tell.
Are there any known workarounds for supporting this kind of use-case?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.