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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering on email field throws ValidationError #95

Open
danousna opened this issue Feb 10, 2020 · 1 comment
Open

Filtering on email field throws ValidationError #95

danousna opened this issue Feb 10, 2020 · 1 comment
Labels

Comments

@danousna
Copy link
Contributor

Hi there,

When I attempt to filter on an email field (for example the default django User model contains an EmailField), I get a validation error (in strict mode) :

query = QueryDict('email__contains=gmail')

# filter set definition ...

# result
ValidationError: {'email__contains': ['Saisissez une adresse de courriel valide.']}

I can somehow understand the error but as I am filtering via a contains, the behaviour is not correct.

@miki725 miki725 added the bug label Feb 10, 2020
@carlfarrington
Copy link

carlfarrington commented Jul 26, 2020

Any ideas for how to fix this? I am not using strict mode, so no error, but any attempts to filter on email__contains (where email is an email field), ends in zero results. It seems to do a exact match - so contact_email__contains='[email protected]' will return something, but 'contact_email__contains=email' returns no results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants