adopted-ember-addons / adopted-ember-addons/ember-cp-validations

Feature Request: support multiple messages (or warningMessages) from validators

Aberta
#612 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
439
Forks
172
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Since an attribute can have multiple messages from multiple validators, it doesn't seem too far fetched to add support for multiple messages from a single validator. For example, I have a custom password strength validator (based on zxcvbn) that can provide multiple suggestions back to the user to improve password strength. If I try to return multiple messages today it seems to get awkwardly stringified, and it breaks the ability to iterate over the messages in an Ember template.

What I'd _really_ like is the ability to return a collection of results that can include both warning results and non-warning results. The validation would be considered invalid if the collection included any non-warning results. That would be a more significant change based on my reading of the source.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.