feat(isDate): Disallow mismatching length for isDate#2056
feat(isDate): Disallow mismatching length for isDate#2056frederike-ramin wants to merge 3 commits intovalidatorjs:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2056 +/- ##
==========================================
- Coverage 99.95% 99.95% -0.01%
==========================================
Files 107 107
Lines 2454 2450 -4
Branches 619 620 +1
==========================================
- Hits 2453 2449 -4
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
In my opinion, that option should be renamed to |
Perhaps it's reasonable to leave behind a TODO-comment in that case? |
That might be good. |
|
@WikiRik any progress on this? Do we need another review? I now want to include the same thing in another project, so the topic is on the top of my mind again. |
|
That's up to @profnandaa |
|
New PR #2481 with resolved conflict. |
|
Merged in #2481 |
Before this, if I provided a format to the
isDatefunction, it was never checked that the format exactly matches - including the length of the date. I could have provided any possible date as long as I only included valid delimiters.Important: I only changed this for
strictModebecause I think there it should 100% be checked, but maybe there are cases (withoutstrictMode) where it is okay? If you want me to remove thestrictModecondition, just let me know.Checklist