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

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

Offen
#612 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
439
Forks
172
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.