fix(isEmail): replace all dots in gmail length validation#1718
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1718 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 101 101
Lines 2005 2005
Branches 452 452
=========================================
Hits 2005 2005
Continue to review full report at Codecov.
|
fedeci
left a comment
There was a problem hiding this comment.
Could you add test cases?
d0aa34a to
89f02c2
Compare
modified existing test case. |
| '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', |
There was a problem hiding this comment.
Why it was passing the test before? Is the GoogleMail domain part of gmail?
There was a problem hiding this comment.
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
|
I have no idea how to code |
I don't know what you mean and I'm unable to Upload files it tells me |
|
Thank you |
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