What’s the best way to store a phone number in Django models?

I am storing a phone number in model like this:

phone_number = models.CharField(max_length=12)

The user would enter a phone number and I would use the phone number for SMS authentication. This application would be used globally. So I would also need a country code. Is CharField a good way to store a phone number? And, how do I validate the phone number?

9 Answers
9

Leave a Comment