Skip to main content

Extends Django password validation options to include minimum uppercase, lowercase, numerical, and special characters.

Project description


Extends Django password validation options to include minimum uppercase, minimum lowercase, minimum numerical, and minimum special characters. This was created in an attempt to keep up with industry standards for strong user passwords.

This package works for both python 3.x and 2.x versions.

NOTE: As of January 01, 2020 python 2.x has been deprecated and will no longer receive continued support. See Python 2.x EOL for more details.


Requires Django 1.11 or later. You can install the latest version of Django via pip:

$ pip install django

Alternatively, you can install a specific version of Django via pip:

$ pip install django=2.2

NOTE: See the django-project documentation for information on non-deprecated Django versions.


Normal installation

Install django-advanced_password_validation via pip:

$ pip install django-advanced_password_validation

Development installation

$ git clone
$ cd django-advanced_password_validation
$ pip install --editable .


The four optional validators must be configured in the file of your django project.



        'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsDigitsValidator',
        'OPTIONS': {
            'min_digits': 1
        'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsUppercaseValidator',
        'OPTIONS': {
            'min_uppercase': 1
        'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsLowercaseValidator',
        'OPTIONS': {
            'min_lowercase': 1
        'NAME': 'django-advanced_password_validation.advanced_password_validation.ContainsSpecialCharactersValidator',
        'OPTIONS': {
            'min_characters': 1


Here is a list of the available options with their default values.

Validator Option Default
ContainsDigitsValidator min_digits 1
ContainsUppercaseValidator min_uppercase 1
ContainsLowercaseValidator min_lowercase 1
ContainsSpecialCharactersValidator min_characters 1



This project is licensed under the MIT License - see the file for details.



VERSION 1.0.4 - 2020-03-25


  • N/A


  • Unused import gettext has been removed.


  • ContainsNumeralsValidator has been modified to ContainsDigitsValidator to be a more intuitive naming convention (i.e. 15 is one numeral, but two digits)
    • Option min_numerals has been changed to min_digits

Bug Fix

  • ContainsSpecialValidator was only checking for one (1) special character instead of the minimum parameter.

VERSION 1.0.3 - 2020-03-20


  • ContainsNumeralsValidator
  • ContainsUppercaseValidator
  • ContainsLowercaseValidator
  • ContainsSpecialCharactersValidator

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page