Registry /
web-framework / django-zxcvbn-password-validator
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ZxcvbnPasswordValidator
✓ from django_zxcvbn_password_validator import ZxcvbnPasswordValidator
✗ from django_zxcvbn_password_validator import ZXCVBNValidator
Add the validator to AUTH_PASSWORD_VALIDATORS in Django settings.
# settings.py
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django_zxcvbn_password_validator.ZXCVBNValidator',
'OPTIONS': {
'min_score': 3,
'user_attributes': ('username', 'email', 'first_name', 'last_name')
}
}
]
Debug
Known issues
gotchaThe library is not compatible with Django >=3.2 if you rely on the old password validators format? Actually it works with Django 2.2+ but check your Django version for generic validators support.fixUse the validator class path as 'django_zxcvbn_password_validator.ZXCVBNValidator'.
affects: >=1.0.0
deprecatedDefining validators via list of strings is deprecated in Django 4.x; use the new tuple format or classes. This library works with the string path format in current versions.fixIf using Django 4.x, consider switching to the class-based definition: ZXCVBNValidator(min_score=3, user_attributes=(...))
affects: Django 4.x+ with strict settings
gotchaThe 'user_attributes' option uses Django's User model fields by default; if you have custom user model, provide the actual field names; missing attributes can cause AttributeError.fixEnsure custom user model has the fields listed, or omit user_attributes entirely.
affects: all
Upgrade
Version history
1.6.0latest on PyPI · released Mar 24, 2026
Audit
Dependencies
djangorequiredRequired for validation framework
zxcvbn-pythonrequiredBackend strength estimation