-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Issue: Domain name validation #6475 Fixed #9496
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9496 +/- ##
==========================================
- Coverage 35.96% 35.95% -0.01%
==========================================
Files 1335 1335
Lines 14722 14726 +4
Branches 1467 1468 +1
==========================================
Hits 5295 5295
- Misses 8511 8514 +3
- Partials 916 917 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Thank you! I let the front developers review it :)
type === 'email' && | ||
!emailRegex.test(value) && | ||
!(parseDomainResult.type === ParseResultType.Listed) | ||
) { |
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 gather the two ifs please ?
Something like:
if (type === 'email') {
parseDomainResult = parseDomain(value);
if (!emailRegex.test(value) || parseDomainResult.type !== ParseResultType.Listed) {
errors.push({ id: 'components.Input.error.validation.email' });
}
}
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.
@petersg83
Yeah, I'll modify the same as nested if
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.
@petersg83
Mentioned changes are committed.
Nested If added inside the domain name validation
Hello @pasha42 thank you for your contribution, however this file is not used anymore in the application we are planning on cleaning the strapi-helper-plugin. The file you are looking for might be this one. I am closing this pull request, feel free to reopen a new one. Again, thank you very much for taking the time to contribute to the project. |
Hello,
This pull request will fix following issue
In the following Pull request >> #7733
@petersg83 (#7733 (review)) have mentioned to integrate the following package - https://github.com/peerigon/parse-domain.
As mentioned I have integrated the same in the strapi-helper-plugin
This is my first PR. Kindly let me know If it needs any modifications or changes.