def validate_email(self, value):
        """ ensure email is in the database """
        if EMAIL_CONFIRMATION:
            queryset = EmailAddress.objects.filter(email__iexact=value, verified=True)
        else:
            queryset = User.objects.get(email__iexact=value, is_active=True).count() == 0
        if queryset.count() < 1:
            raise serializers.ValidationError(_("Email address not found"))
        return queryset.first().email
ensure email is in the database