I don't know if I understood, but the example you posted is about forms, right? That's the point, I don't wanna need to write forms to modify error messages.
On Thu, May 12, 2011 at 10:54 PM, Shawn Milochik <sh...@milochik.com> wrote: > On 05/12/2011 09:35 PM, Daniel França wrote: > >> I wanna change the error messages without to need to rewrite fields code, >> to >> be more specific I want to translate them... >> >> > Did you try setting the error_messages value? > > http://docs.djangoproject.com/en/1.3/ref/forms/validation/#using-validators > > There's a full example in this document, using e-mail field as an example. > It's also translation-friendly, if you follow the convention of importing > ugettext_lazy as _ (underscore) and using it in your model. > > > > > > > -- > 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 > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.