[EMAIL PROTECTED] skrev:
> thanks for your reply! i resolved using this code in the models.py
> before save(): def save(self): if len(self.title)<6: raise
> ValidationError("cannot be blank or small than 6 byte!") it works for
> me!
>
> but i find this code in django-tagging (http://code.google.com/p/
> django-tagging/): models.py: from tagging.validators import isTag
> name = models.CharField(validator_list=[isTag])

Hmmm, AFAICT the docs have no info about the behavior of validator_list
when used on a model field rather than a form field.

After a quick look at the source, it seems the validator_list is
"inherited" by form fields when an oldform is derived from the model.

So if you are using oldforms, what you are doing should work (with the
caveat about missing data). If you are not using oldforms, it probably
won't.

Nis


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