Use CharField and try to find on
https://django-localflavor.readthedocs.io/en/latest/ a Phone form Field for
valid to you country or create

Or create your own PhoneFormField with the validation rules that you need

Implementation example:
https://github.com/django/django-localflavor/blob/master/localflavor/br/forms.py#L38-L58


On Wed, Dec 14, 2016 at 4:36 PM, Sithembewena Lloyd Dube <[email protected]>
wrote:

> Hi,
>
> Has anyone captured phone number information using a Form/ModelForm
> instance? I have the field as an IntegerField in my model and (for obvious
> reasons) it truncates the leading '0'. How have you solved this problem,
> anyone?
>
> --
> Regards,
> Sithembewena
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAH-SnCD_zD980PLhau2eoGrKYy22%2BCorCB%
> 2Bu%2BR5MwFUoY0rDhg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAH-SnCD_zD980PLhau2eoGrKYy22%2BCorCB%2Bu%2BR5MwFUoY0rDhg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul

http://pythonclub.com.br/

Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e
mandar o pull-request. Leia mais sobre como publicar em README.md e
contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python
ou é útil para quem usa Python? Está esperando o que? Publica logo, que
estou louco para ler...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVjvMatX%2B2uV0JnZa7pYn_Af_n1kCkJOQKuQf0iPq_gvW3CVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to