Bounce icon indicating copy to clipboard operation
Bounce copied to clipboard

Return error in form if email already exists

Open cfahlgren1 opened this issue 4 years ago • 2 comments

Currently, the django form doesn't inform user on the front end if the email already exists. By following the guide below, it is pretty easy to present an error on the frontend.

You can accomplish this without much hassle! Using the form is_valid() method you can check for any errors (Like the already existent email), and render the same page but this time including the error for the user to see.

Look at this simple example: https://www.dark-hamster.com/application/how-to-display-form-error-in-django/

Originally posted by @marcorichetta in https://github.com/cfahlgren1/Bounce/issues/16#issuecomment-703208839

cfahlgren1 avatar Oct 04 '20 19:10 cfahlgren1

@cfahlgren1 I have made changes for above, do check and let me know in case you need anything else.

transhapHigsn avatar Oct 05 '20 23:10 transhapHigsn

@cfahlgren1 I have made changes for above, do check and let me know in case you need anything else.

Hey @transhapHigsn , I am still getting an error even when the email that is inputted is valid.

cfahlgren1 avatar Oct 13 '20 03:10 cfahlgren1