Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Chris Kavanagh
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

Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Vijay Khemlani
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

Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Chris Kavanagh
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

Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Vijay Khemlani
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

Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Chris Kavanagh
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