-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validation Hyphen before year is not allowed #2381
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add additional tests
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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