adopted-ember-addons / adopted-ember-addons/ember-validators

The date validator has a different allowBlank validation

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

描述

Hi! :wave:

While working with [ember-changeset-validations](https://github.com/poteto/ember-changeset-validations), which uses this addon quite extensively, I saw there was an "inconsistency" in the behaviour of the date validator's `allowBlank` option, which checks nullish values and empty strings instead of using Ember's util `isEmpty`, as per all other validators ([cf.](https://github.com/offirgolan/ember-validators/blob/1568f472eb5d9851222b9944521ff1ba529641dd/addon/date.js#L29)).
I also saw that was introduced when removing Moment ([cf. commit](https://github.com/offirgolan/ember-validators/commit/f829984c8c28152f6e15d0b091308583fb1ac997)). Was it meant to be?

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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