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

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

未關閉
#612 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
439
分支
172
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。