DisposableEmailChecker
DisposableEmailChecker copied to clipboard
Something wrong with the regular expression
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.
I created at PR at https://github.com/aaronbassett/DisposableEmailChecker/pull/16 for this