Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(isEmail): replace all dots in gmail length validation#1718

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

DasDingGehtNicht
Copy link
Contributor

@DasDingGehtNichtDasDingGehtNicht commentedAug 30, 2021
edited
Loading

The gmail domain specific validator checks the length of the username part and replaces dots as they don't count against the limit. But the replace function only replaced the first dot. Fixed by using regex with g switch.

Checklist

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

@codecov
Copy link

codecovbot commentedAug 30, 2021
edited
Loading

Codecov Report

Merging#1718 (89f02c2) intomaster (8c4b3b3) willnot change coverage.
The diff coverage is100.00%.

Impacted file tree graph

@@            Coverage Diff            @@##            master     #1718   +/-   ##=========================================  Coverage   100.00%   100.00%           =========================================  Files          101       101             Lines         2005      2005             Branches       452       452           =========================================  Hits          2005      2005
Impacted FilesCoverage Δ
src/lib/isEmail.js100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update8c4b3b3...89f02c2. Read thecomment docs.

Copy link
Contributor

@fedecifedeci left a comment

Choose a reason for hiding this comment

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

Could you add test cases?

@DasDingGehtNicht
Copy link
ContributorAuthor

Could you add test cases?

modified existing test case.
test case: 'some.name.midd.leNa.me.and.locality+extension@GoogleMail.com',
pre-fix: invalid (somename.midd.leNa.me.and.locality = 35 chars)
post-fix: valid (somenamemiddleNameandlocality = 29 chars)

Copy link
Member

@tux-tntux-tn left a comment

Choose a reason for hiding this comment

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

LGTM 🎉
Nice catch!

@tux-tntux-tn added ready-to-landFor PRs that are reviewed and ready to be landed 🎉 first-pr labelsAug 30, 2021
'test|123@m端ller.com',
'test123+ext@gmail.com',
'some.name.midd.leNa.me+extension@GoogleMail.com',
'some.name.midd.leNa.me.and.locality+extension@GoogleMail.com',
Copy link
Contributor

Choose a reason for hiding this comment

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

Why it was passing the test before? Is the GoogleMail domain part of gmail?

Copy link
Member

Choose a reason for hiding this comment

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

Max length is supposed to be 30 characters without the dots and the email alias (any string after the+ character) . Even after removing only one dot the old string length was less than 30

fedeci and DasDingGehtNicht reacted with thumbs up emoji
@03-65
Copy link

I have no idea how to code

@03-65
Copy link

Could you add test cases?

modified existing test case.
test case: 'some.name.midd.leNa.me.and.locality+extension@GoogleMail.com',
pre-fix: invalid (somename.midd.leNa.me.and.locality = 35 chars)
post-fix: valid (somenamemiddleNameandlocality = 29 chars)

I don't know what you mean and I'm unable to Upload files it tells me

@03-65
Copy link

Thank you

Copy link
Member

@profnandaaprofnandaa left a comment

Choose a reason for hiding this comment

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

Good catch, thanks! 🎉

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tux-tntux-tntux-tn approved these changes

@profnandaaprofnandaaprofnandaa approved these changes

+1 more reviewer

@fedecifedecifedeci left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

🎉 first-prready-to-landFor PRs that are reviewed and ready to be landed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@DasDingGehtNicht@03-65@profnandaa@tux-tn@fedeci

[8]ページ先頭

©2009-2025 Movatter.jp