On 09.04.2009, at 09:27, emonk wrote:

> Hi people.
> This is my doubt
>
> I need make a form field with this restrictions:
>
> _field content must be only integers numbers and postive.
> _filed content must have a max lenght, for example 8 characters.
>
> I am confused beacuse models.PositiveIntegerField has no have  
> max_length atribute (have a max_value), but models.CharacterField  
> have max_lenght atribute.
>
> Any idea? :S

An integer doesn't usually have a max length, if at all it has a max  
value. Which in your case sounds like 99.999.999.
To actually achieve what you want read through the form validation  
docs http://docs.djangoproject.com/en/dev/ref/forms/validation/

adi

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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