Uh oh!
There was an error while loading. Please reload this page.
refactor(isDate): add strictMode and prevent mixed delimiters - #1402
Conversation
Codecov Report
@@ Coverage Diff @@## master #1402 +/- ##
=========================================
Coverage 100.00% 100.00% =========================================
Files 95 95 Lines 1248 1257 +9 =========================================
+ Hits 1248 1257 +9
Continue to review full report at Codecov.
|
tux-tn
commented
Aug 8, 2020
validator.isDate('2020-05-02',{format: 'YYYY/MM/DD',strictMode: true});/// returns falsevalidator.isDate(newDate(),{format: 'YYYY/MM/DD',strictMode: true});// returns false |
ezkemboi
commented
Aug 8, 2020
@tux-tn thanks for working on this. |
profnandaa
left a comment
There was a problem hiding this comment.
LGTM, thanks for the good work on this. I'm okay at some point down the line, making strictMode = true the default -- but for now, this is okay to maintain b/c.
Hello,
I made some changes to
isDateto allow for more flexibility.strictModeto enforce strict comparison between input and format. InstrictModeDate objects, inputs with a different delimiter or string format are disallowed.delimiterslistisDate(input, format)Checklist