FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fixed issue #2432 by code0emperor · Pull Request #2437 · validatorjs/validator.js · GitHub

fixed issue #2432 - #2437

Merged
profnandaa merged 5 commits into
validatorjs:masterfrom
code0emperor:code0emperor-quote-email-fix
Aug 15, 2024
Merged

fixed issue #2432#2437
profnandaa merged 5 commits into
validatorjs:masterfrom
code0emperor:code0emperor-quote-email-fix

Conversation

code0emperor commented Aug 9, 2024
edited by rubiin
Loading

Copy link
Copy Markdown
Contributor

an email of the type "example*@gmail.com was accepted due to an errant if statement in isEmail.js file which was only checking for the first double quote (user[0] === '"'). Fixed it by adding a secondary "and" condition along with it, to ensure the local part is completely enclosed in the double quotes (&& user[user.length - 1] === '"').

Checklist

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

rubiin commented Aug 10, 2024

Copy link
Copy Markdown
Member

could you also add tests for this specific scenario

Copy link
Copy Markdown
Contributor Author

In which file should I add them? I wasn't sure of that

Copy link
Copy Markdown
Contributor Author

added few tests for this issue in validators.test.js

rubiin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

the tests seems to be failing do fix

Copy link
Copy Markdown
Contributor Author

yep, am on it rn

codecov Bot commented Aug 10, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (f81d857) to head (1250755).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##            master    #2437      +/-   ##
===========================================
- Coverage   100.00%   99.96%   -0.04%     
===========================================
  Files          110      111       +1     
  Lines         2510     2517       +7     
  Branches       633      634       +1     
===========================================
+ Hits          2510     2516       +6     
- Partials         0        1       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

code0emperor commented Aug 10, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Done, i put the test in the wrong area, please check now

Copy link
Copy Markdown
Member

Thanks for your contrib! 🎉

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL