Re: multi field validation

2008-11-25 Thread Alessandro Ronchi
2008/11/25 Jeff FW <[EMAIL PROTECTED]>: > > Alessandro, > > I'm not exactly sure what you're asking, but I think you want to know > how to check multiple fields (possibly against each other) when > submitting a form in the admin. Let me know if I'm off-base here. > > Take a look at: > http://docs.

Re: multi field validation

2008-11-25 Thread Jeff FW
Alessandro, I'm not exactly sure what you're asking, but I think you want to know how to check multiple fields (possibly against each other) when submitting a form in the admin. Let me know if I'm off-base here. Take a look at: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-cust

Re: Multi field validation with clean method

2007-08-10 Thread jeffhg58
I was finally able to figure it out as I saw on another post. Instead, of using the RaiseValidation error I did the following: self.errors.update(annotation=ErrorList([u'You must enter an Annotation Type.'])) Thanks for all your help, Jeff -- Original message -- From:

Re: Multi field validation with clean method

2007-08-10 Thread rskm1
On Aug 9, 7:34 pm, [EMAIL PROTECTED] wrote: > So, if I use clean_annotationvalue to do both how would I be able to put an > error > message on the annotation type ... I think you were on the right track the first time. Philosophically, the Form's clean() method is where you're supposed to be do

Re: Multi field validation with clean method

2007-08-09 Thread Collin Grady
Reverse the field order in the form, otherwise not that I'm aware of. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsub

Re: Multi field validation with clean method

2007-08-09 Thread jeffhg58
So, if I use clean_annotationvalue to do both how would I be able to put an error message on the annotation type when a value is entered but no annotation type is entered. Wouldn't that error message appear under the annotationvalue field Jeff -- Original message -- Fro

Re: Multi field validation with clean method

2007-08-09 Thread Collin Grady
The clean_foo functions are run in order. So in your situation, clean_annotationtype will only have access to the annotationtype value, but clean_annotationvalue will be able to see both, since clean_annotationtype has already been run. --~--~-~--~~~---~--~~ You