Django-phonenumber-field

Latest version: v8.0.0

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

3.0.1

------------------

* Allow overriding the default invalid phone number message.

3.0.0

------------------

* Update French and Hebrew translations.
* Add a valid phone number example to invalid phone number error messages.

**Backwards incompatible changes**

* Drop support for Django 2.0.
* Drop support for Python 2.7 and 3.4.

2.4.0

------------------

* A ``PhoneNumberField`` can now be deferred with ``QuerySet.defer()``.
* Saving or filtering by an invalid phone number will now raise a
``ValueError``.
* The model field attribute ``PhoneNumberField.region`` now uses
``PHONENUMBER_DEFAULT_REGION`` if not specified.

2.3.1

------------------

* Fixed a regression to re-allow the model field to override the default form
field.

2.3.0

------------------

* Added the ``region`` keyword argument to ``PhoneNumberField``.
* Fix representation of invalid phone numbers in the database, previously
stored as ``+NoneNone``. Now, invalid phone numbers are represented as:

1. the field's `default`_ when it is specified, or
2. empty ``str`` if the field is `blank`_ and not `null`_, or
3. null.

Existing database records can be upgraded with a `data migration`_.
* Added support for Django 2.2.
* Tests are now included in the sdist package.
* ``modelfields.PhoneNumberField`` now inherits from ``models.CharField``
instead of ``models.Field``.

.. _default: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.default
.. _blank: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.blank
.. _null: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.null
.. _data migration: https://docs.djangoproject.com/en/dev/topics/migrations/#data-migrations

2.2.0

------------------

* Added support for ``null=True``

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.