Skip to content

[Feature Request] Restore date validator capabilities re: 'format' and 'precision,' and allow use of 'now' as a reference time #723

Open
@tehhowch

Description

@tehhowch

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:
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions