mfbx9da4 / deep-email-validator

Validates regex, typos, disposable, dns and smtp
MIT License
873 stars 92 forks source link

Valid emails marked as typo #68

Open abdullah99R opened 1 year ago

abdullah99R commented 1 year ago

Valid emails marked as invalid some time e.g on jeff.ganim@pacific.co I am getting

"result": {
            "valid": false,
            "validators": {
                "regex": {
                    "valid": true
                },
                "typo": {
                    "valid": false,
                    "reason": "Likely typo, suggested email: jeff.ganim@pacific.com"
                },
                "disposable": {
                    "valid": false
                },
                "mx": {
                    "valid": false
                },
                "smtp": {
                    "valid": false
                }
            },
            "reason": "typo"
        }
AhmedY0unes commented 1 year ago

you can suppress this issue by adding the top level domain co to the additionalTopLevelDomains like below.

await validate({
  email: 'name@example.ir',
  sender: 'name@example.ir',
  validateRegex: true,
  validateMx: true,
  validateTypo: true,
  validateDisposable: true,
  validateSMTP: true,
  additionalTopLevelDomains: [ 'co' ]
})

it was hinted in the README.