DisposableEmailChecker icon indicating copy to clipboard operation
DisposableEmailChecker copied to clipboard

Something wrong with the regular expression

Open maxmalysh opened this issue 9 years ago • 1 comments

All these lines produce a ValidationError: ['Blocked email provider.'] :

In [1]: from django.core.exceptions import ValidationError
In [2]: from disposable_email_checker.validators import validate_disposable_email
In [3]: 
In [6]: validate_disposable_email('[email protected]')
In [7]: validate_disposable_email('[email protected]')
In [13]: validate_disposable_email('[email protected]')
In [15]: validate_disposable_email('[email protected]')

Here is a domain loader:

from disposable_email_checker.emails import email_domain_loader

def unwanted_email_domain_loader():
    return email_domain_loader()

It looks like the regular expression matches email if there is a blocked domain which is a suffix for a given domain. So heyzzz.com is matched because zzz.com is included in the list, but heyzzz.com is not in the list and should not be blocked.

maxmalysh avatar Apr 19 '17 02:04 maxmalysh

I created at PR at https://github.com/aaronbassett/DisposableEmailChecker/pull/16 for this

sjdines avatar Jan 18 '18 04:01 sjdines