Re: Customizing validation error messages

2007-06-08 Thread Przemyslaw Wegrzyn
Malcolm Tredinnick wrote: >You don't explain whether you are using oldforms or newforms here. > > Right - at the moment using oldforms with generic views, I'm not yet really familiar with newforms. I'm quite new to Django :) >For newforms, override the Field class(es) that you wish to customis

Re: Customizing validation error messages

2007-06-08 Thread Malcolm Tredinnick
On Fri, 2007-06-08 at 13:09 +0200, Przemyslaw Wegrzyn wrote: > Hi! > > How can I customize a validation error message? Looking at the code of > any validator I can see that it uses gettext(), so I can use i18n > mechanisms to customize the message. But I'm not too happy with that. > > What if I

Customizing validation error messages

2007-06-08 Thread Przemyslaw Wegrzyn
Hi! How can I customize a validation error message? Looking at the code of any validator I can see that it uses gettext(), so I can use i18n mechanisms to customize the message. But I'm not too happy with that. What if I want the message to be generated dynamically based on the actual data (Like