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

Add 'clean_email' method to ProfileForm. #2

Closed
TunedMystic opened this issue May 11, 2016 · 1 comment
Closed

Add 'clean_email' method to ProfileForm. #2

TunedMystic opened this issue May 11, 2016 · 1 comment

Comments

@TunedMystic
Copy link
Collaborator

When cleaning a ProfileForm, add a clean_email method.

The clean_email method should check that the given email is unique (aka it doesn't exist in the database).

In the clean_email method, if an email is NOT unique, then raise a ValidationError with an appropriate error message. Also display that error message in the template.

Check these docs for reference on ValidationErrors.

@TunedMystic
Copy link
Collaborator Author

@gitsomecode If you have any questions, feel free to reach out.

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

No branches or pull requests

1 participant