Add validation Hyphen before year is not allowed#2381
Add validation Hyphen before year is not allowed#2381profnandaa merged 3 commits intovalidatorjs:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2381 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 107 107
Lines 2449 2451 +2
Branches 619 620 +1
=========================================
+ Hits 2449 2451 +2 ☔ View full report in Codecov by Sentry. |
|
Hi @WikiRik Can you explain what test case should i add as adding test case for this scenario as below will fail the test case. '-2020-03-15' |
|
I think it is good except for the tests. |
|
Added test cases as requested |
WikiRik
left a comment
There was a problem hiding this comment.
Can you add something like new Date('-2014-03-15') as well? Or does that give an error with the Date library already?
|
@WikiRik , When I added the new Date('-2014-03-15') to the test cases, it seems to be failing. Upon investigation, I found that the new Date('-2014-03-15') function returns a valid "full date string" (Sat Mar 15 2014 00:00:00 GMT-0700 (Pacific Daylight Saving Time)). Thank you for your attention to this matter. |


Checklist