On 20 mar, 06:50, Crispin Wellington <cwelling...@ccg.murdoch.edu.au>
wrote:
> Hey there.
>
> I want to add a custom validator to a model field. In django 0.96 there
> was the validator_list parameter that could easily do this for me. Now
> it is no more. Also django.core.validators is gone.

Yes, indeed. AFAIK, the team has plans for some replacement, but
you'll have to do without for now. The simplest solution to model
validation is overriding the model's save() method.

> How do I add a custom validator to a form field now?

Form validation and model validation are two distinct issues.

> I want to ensure
> that that a FloatField contains a positive value, but NOT zero. I need
> this to be enforced in Django admin.
>
> How do I do this now in Django 1.0?
>

http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-custom-validation-to-the-admin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to