Sounds like you're looking at the oldforms documentation--that's all been deprecated. Read this instead: http://www.djangoproject.com/documentation/newforms/
Especially this part: http://www.djangoproject.com/documentation/newforms/#custom-form-and-field-validation -Jeff On Jul 21, 8:14 am, "Alex Rades" <[EMAIL PROTECTED]> wrote: > Hi, > > First of all, I'm using trunk :) > > I have a couple of models like: > > class User(model.Model): > group = models.ForeignKey(Group) > > Class Group(model.Model): > interest = models.ForeignKey(Interests) > > Basically i want to be possible to change in the admin the interest of > a Group *only if*: > > self.user_set.count() == 0 > > The documentation is not very about custom validation, it says to pass > validator_list to the field definition, so i've tried with: > > interest = models.ForeignKey(interests, validator_list = [ myvalidator ]) > > But it seems the custom validators are not called at all. Is this > possible? How do I perform custom validation on a specific form? Doing > it into the save() method of the model is not suitable (I want to > raise an error which is specific to a field and is displayed next to > the field itself) > > Thanks --~--~---------~--~----~------------~-------~--~----~ 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 unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---