Hello,

As I understand it the model field paramater "validator_list" is now
being phased out with newforms.  I'm using newforms-admin, and am in
need of a similar way of doing validation.  Are there any hooks or
even hacks available that could achieve this?

I understand the preferred method is to create a custom form Field,
and do validation in its clean() method.  However, this appears to be
lacking in a couple ways.

First of all, it assumes you're generating the form manually.  What if
you're using form_for_model, or more critically, using the admin
interface?  Is there a way to specify custom form Field instances for
a corresponding model Field in the admin?

Secondly, in the admin the potential to do multi-field validation is
gone (or seems to be).  The old validator function passed the values
(field_data, all_data), allowing one to check the value of other
fields in the form via the all_data field.  Is it no longer possible
to, for instance, trigger validation of one field off another via the
admin in newforms-admin?  (ie, if field1 is None, field2 is required;
if field1 is filled, field2 is not required.)

Any suggestions would be much appreciated.

Thanks,
Dan


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to