I got it working Vijay! Thank you so much for your help, and have a great
Christmas!!
On Thursday, December 22, 2016 at 9:55:05 PM UTC-5, Vijay Khemlani wrote:
>
> if the form is not valid then form.errors should contain human-readable
> errors for each field, including the one you validate you
if the form is not valid then form.errors should contain human-readable
errors for each field, including the one you validate yourself (the string
inside the raise ValidationError call), you can return that.
On Thu, Dec 22, 2016 at 11:49 PM, Chris Kavanagh wrote:
> Yeah, I was wrong Vijay. For s
Yeah, I was wrong Vijay. For some odd reason I thought the ValidationError
would catch it BEFORE submitted. . .
I re-read the docs and saw I was wrong. .
In other words, I I try to submit the form with the input field empty, I
get a small pop up error saying "Please Enter An Email".
Or, if I u
I'm not following
If you submit the form with incorrect information (non unique email) then
your view does not return anything because form.is_valid() returns False
Validation errors don't prevent the form from being submitted, they prevent
the form from validation (making form.is_valid() return
I have a model form called *"ContactForm" *that has an email field. I
created a custom* forms.ValidationError* in *"clean_email"* method
which checks to see if the email is already in the database , however it's
never raised on submit.
When submit is called, the view runs and I get the error
5 matches
Mail list logo