On May 24, 12:04 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Your form-level clean method should run through all of its validation, > collecting the errors as it goes and then raise a ValidationError. Note > that ValidationError can take a list of error messages in its > constructor, so just collect all your errors into a list and pass them > all at once to a single ValidationError raiser.
How should i proceed if i wanted to display the error msg next to the field having done validation in the form.clean() method? This way error messages can be displayed only with {{form.errors}} How would i display the error in {{form.foo.errors.as_text}}? I tried adding manually to self.errors["foo"] = [u"There is a problem with the foo field"] but it doesn't render at all then when i call {{form.foo.errors.as_text}} Thanks, Lorenzo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---