Skip to content
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

feat(isRFC3339): Disallow prepended and appended strings to RFC 3339 date-time #1654

Merged
merged 1 commit into from Apr 21, 2021

Conversation

jmacmahon
Copy link
Contributor

Fixes #1653

Adds test cases for invalid RFC 3339 strings as valid date-time strings, but prepended and appended with the word "nonsense".

Also adds equivalent test cases for ISO 8601 validator (but did not change the implementation as it was already OK).

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

Fixes validatorjs#1653

Also adds corresponding test cases to ISO 8601 validator
@jmacmahon jmacmahon changed the title feat(isRFC3339) Disallow prepended and appended strings to RFC 3339 date-time feat(isRFC3339): Disallow prepended and appended strings to RFC 3339 date-time Apr 21, 2021
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #1654 (9658447) into master (24b3fd3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1654   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          101       101           
  Lines         1854      1854           
=========================================
  Hits          1854      1854           
Impacted Files Coverage Δ
src/lib/isRFC3339.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24b3fd3...9658447. Read the comment docs.

Copy link
Member

@tux-tn tux-tn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was fast! Thank you @jmacmahon and congrats for your first PR here 🎉

@tux-tn tux-tn added ready-to-land For PRs that are reviewed and ready to be landed 🎉 first-pr labels Apr 21, 2021
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks and welcome to the project!

@profnandaa profnandaa merged commit d1a9b6d into validatorjs:master Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 first-pr ready-to-land For PRs that are reviewed and ready to be landed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC 3339 validator accepts invalid strings
3 participants