Open iamvanja opened 6 years ago
@iamvanja Thanks for bringing this up. It's been on a list of things to take care of. I like the idea of using Luxon and maybe as a peer dependency. That would make date validation opt-in in a sense, if you didn't install Luxon then house-rules date validation would be unavailable.
I don't think I want to rely on validator though, the needs I'm going have with date validation will eventually surpass validator's abilities
Thoughts?
@bradwestfall After thinking about this a bit further, I think if house-rules must keep the dates, the best solution IMHO would be to keep Moment, but make it a peer dependency. Reasoning is that projects that do a lot of date manipulations already include Moment anyway since it became defacto standard.
I know you disagree, but I do think that date validations outside of the validator scope should not be part of house-rule. It is simple to create custom rules for anything outside the validator scope so whatever the date dependency in the project, it would not be dictated by house-rules.
With the introduction of date validation, house-rules gained weight dramatically (due to Moment.js).
Can we do something about this?
isAfter
andisBefore
methods.