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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for additional second level domains and domains. gmrit.edu.in is a valid mail domain, but typo module suggesting gmx.com. #74

Open
dheerajbudhiraja opened this issue May 6, 2023 · 0 comments

Comments

@dheerajbudhiraja
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/deep-email-validator/dist/index.js b/node_modules/deep-email-validator/dist/index.js
index d76e024..179994d 100644
--- a/node_modules/deep-email-validator/dist/index.js
+++ b/node_modules/deep-email-validator/dist/index.js
@@ -28,7 +28,7 @@ function validate(emailOrOptions) {
                 return output_1.createOutput('regex', regexResponse);
         }
         if (options.validateTypo) {
-            const typoResponse = yield typo_1.checkTypo(email, options.additionalTopLevelDomains);
+            const typoResponse = yield typo_1.checkTypo(email, options.additionalTopLevelDomains, options.additionalSLDs,options.additionalDomains);
             if (typoResponse)
                 return output_1.createOutput('typo', typoResponse);
         }
diff --git a/node_modules/deep-email-validator/dist/options/options.d.ts b/node_modules/deep-email-validator/dist/options/options.d.ts
index 3b2ace0..e4ef9f9 100644
--- a/node_modules/deep-email-validator/dist/options/options.d.ts
+++ b/node_modules/deep-email-validator/dist/options/options.d.ts
@@ -8,6 +8,8 @@ declare type Options = {
 };
 declare type MailCheckOptions = {
     additionalTopLevelDomains?: string[];
+    additionalSLDs?: string[],
+    additionalDomains?: string[]
 };
 export declare type ValidatorOptions = Partial<Options> & {
     email: string;
diff --git a/node_modules/deep-email-validator/dist/typo/typo.d.ts b/node_modules/deep-email-validator/dist/typo/typo.d.ts
index 3d376a8..ec1b3c4 100644
--- a/node_modules/deep-email-validator/dist/typo/typo.d.ts
+++ b/node_modules/deep-email-validator/dist/typo/typo.d.ts
@@ -1 +1 @@
-export declare const checkTypo: (email: string, additionalTLDs?: string[] | undefined) => Promise<string | undefined>;
+export declare const checkTypo: (email: string, additionalTLDs?: string[] | undefined,additionalSLDs?: string[] | undefined,additionalDomains?: string[] | undefined ) => Promise<string | undefined>;
diff --git a/node_modules/deep-email-validator/dist/typo/typo.js b/node_modules/deep-email-validator/dist/typo/typo.js
index 572f508..54940f8 100644
--- a/node_modules/deep-email-validator/dist/typo/typo.js
+++ b/node_modules/deep-email-validator/dist/typo/typo.js
@@ -14,15 +14,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
 Object.defineProperty(exports, "__
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

No branches or pull requests

1 participant