Re: validators as Meta attribute in ModelForms

2008-04-15 Thread Steven Armstrong
Honza Král wrote on 04/16/08 00:13: > Hi, > check out ticket #6845 ( http://code.djangoproject.com/ticket/6845 ). > It enables you to define validators on both DB Fields and FormFields > and should make your work much easier. > Hi Honza Found your ticket just after posting this :) Will keep an

Re: validators as Meta attribute in ModelForms

2008-04-15 Thread Honza Král
Hi, check out ticket #6845 ( http://code.djangoproject.com/ticket/6845 ). It enables you to define validators on both DB Fields and FormFields and should make your work much easier. On Sun, Apr 13, 2008 at 6:09 PM, Steven Armstrong <[EMAIL PROTECTED]> wrote: > > Hi > > I've made a small change t

validators as Meta attribute in ModelForms

2008-04-13 Thread Steven Armstrong
Hi I've made a small change to the ModelForm framework to allow declarative definition of validators. This allows for quick and easy reuse of validators and means I have to write less clean_foo methods. This works both in the admin as in custom views. What used to be written like this: clas