adopted-ember-addons / adopted-ember-addons/ember-cp-validations
[Feature Request] Restore date validator capabilities re: 'format' and 'precision,' and allow use of 'now' as a reference time
- Ngôn ngữ chính
- JavaScript
- Star
- 439
- Fork
- 172
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
The use of ember-validators >4 in #715 removed the ability to specify `'now'` and `'precision'` unnecessarily, and presents a huge pain point for consumers that generate their validations at the time of bundle/startup. (#715 failed to reflect these changes in the documentation site, too, so consumers can be [misled rather easily](https://adopted-ember-addons.github.io/ember-cp-validations/docs/classes/Date.html):

Given that this addon wraps ember-validators, it should be simple for the Date validator to handle receiving `'now'` and `'precision'` arguments and construct the correct calls to make to ember-validators.
For example, if the validator is created with `'now'`, then any time the validator runs, it would compute the current datetime and forward that to ember-validator, rather than just passing down `'now'`.
With support for these two arguments restored, a large breaking change that requires consumer apps to rearchitect simply vanishes, making deprecation removal and upgrading easier for the ecosystem.
cc @fsmanuel for visibility
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.